Jump to content

Debugging no workie, halp plz


Dusty

Recommended Posts

Posted

Doing some SP coding in Visual Studio 2013, and trying to debug, but it stopped working recently.

 

So, lately, debugging using breakpoints hasn't been working because of this message:

http://s15.postimg.org/h1fup6ttn/error1.png

 

(dustyspatch_sp.x86.exe is just a renamed openjk_sp.x86.exe file)

 

The .pdb file is for debugging I know, but what happened to it, and how can I get it back? Where should it be located if I need to delete it to force VS 2013 to make a new one?

Posted

Tried that, but didn't seem to do anything. Tried a bunch of things but I still can't get it to work, same problem :(

 

Could you do me a huge favor DT and take a pic of the pdb file so I know what I'm looking for, and maybe of your debug settings for your startup project? Pretty plz?

Posted

So I'm guessing the Program Debug Database format files in my folders are the .pdb files.

 

After a bunch of fiddling the error message seems to be gone but looking at my breakpoints while running the game through Debug they are still open circles with the message "breakpoint will not be hit because no symbols loaded for this document". Erg! What is it?

Posted

Still not working haha. I must just not have the file and folder structures set up right or something. I'll find some guide to debugging with Visual Studio and make sure I understand exactly how to do it, and assuming I'm able to fix things through that, I'll post back here and explain what the problem was.

 

Thanks for trying to help DT :winkthumb:

Posted

Change your debug settings. You should be running from your debug compilation, not moving files around.

Right click on the EXE project and hit "Set as startup project"

Right click on it again, this time go to Properties (or "Project Properties")

In Debug, set the Working Directory to be the same as the output directory.

There should be an option somewhere for program arguments. Add: +set fs_basepath "<YOUR_JA_GAMEDATA_PATH>" +set fs_homepath "." +set fs_game "<YOUR_FS_GAME>"

It should load your DLLs first, but if you're having problems, change the fs_basepath to fs_cdpath (unless that was removed from OJK)

  • 2 weeks later...
Posted

@@eezstreet:

So, I did everything you said Eez. I get an error though on starting up the project in Debug saying "OpenAL32.dll is missing" or something seemingly implying to me that the Debug isn't finding the appropriate dlls from my JA/Gamedata folder.

 

You didn't mention setting a "command" for the startup project. Should I not need one because the start up project is the .exe? The only thing that fixes this error is setting "command" to the openjk_sp.exe in my JA/GameData folder. And still no matter what I my break points won't work for seemingly the same reasons as in the beginning.

 

I'm going to try again with Visual Studio 2012 instead and see if that works...

 

 

EDIT: Forgot about the inttypes.h thing not being compatible with VS2012... now onto the next thing, trying reinstalling VS2013.

Posted

So after going back and reading about debugging, it seems like I've been overthinking the whole thing, and it's actually kind of simple. Symbols seem to be being loaded when I set the startup project / debug command to OpenJK/build/debug/openjk_sp.x86. However I get this error: Program cannot start because OpenAL32.dll is missing.

 

How do I get this to work? Should I have Visual Studio build my dlls directly to Jedi Academy's folders?

Posted
  On 1/22/2015 at 4:31 PM, Raz0r said:

It means the current working directory needs to contain OpenAL32.dll

 

Sometimes it's the simple solutions you miss. Thank you :).

 

Anyway, still no symbols being loaded for jagamex86. Scouring the debug console output thingie in VS 2013, I can see both openjk_sp.x86.exe and rdsp-vanilla_x86.dll have their symbols located and loaded. But no mention anywhere in the console of jagamex86.dll and its symbols being loaded, no mention even of its symbols being unable to be loaded. Something is fishy...

 

To my untrained eyes it looks like the Debug build is just skipping over the SP Game Library project / my jagamex86.dll. But whai?

Posted

Sorry for waiting so long to post back.

 

I checked in the modules window and there's no jagamex86 in there at all. I tried removing the SP game library project from the solution and re-adding it, but still no dice. I don't know why in fudge's name it's being skipped...

Posted

Here it be.

 

Debug Output:

 

  Reveal hidden contents

 

 

From what I see no mention of jagamex86 anywhere.

Posted

You haven't started the game yet... Like I already said, jagamex86.dll doesn't get loaded until you start the game (I.e. Start playing on a map).

Posted

^Eh, silly me.

 

So it seems that instead of using my dll in OpenJK/build/Debug it's using the one in Gamedata/Dusty_Patch. And this I'm guessing is causing this error I'm getting where it finds the appropriate symbol pdb files but can't load them for that dll because it gives an error saying "image does not match"...

Posted

SP doesn't load the DLL from the same directory as the .exe like in MP. You'll need to copy the DLL to your Dusty_Patch folder or build the INSTALL project in MSVC if you've set it up correctly.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...