Jump to content

Home

Problems running JKA code in .NET and debug


RenegadeOfPhunk

Recommended Posts

Hi,

 

Anybody tried running the JKA code in debug in .NET yet?

 

I can get the code to start running, and I can put in breakpoints etc, but it's crashing before it get's to displaying the main menu.

 

The crash is in ui_shared.c line 7598. The function is:

 

qboolean ItemParse_asset_model_go

 

, and the name being passed in is:

 

models/players/jedi_tf/model.glm...

 

Anybody got any ideas?

Link to comment
Share on other sites

  • 3 weeks later...

Out of curiosity, Renegade, what happens when you run the game in debug mode and you hit a breakpoint?

 

Does it just bounce you out of the game into the IDE, at which point you can inspect your variables, etc.?

 

I've not tried any debugging yet... I don't even have JKA, but it should be arriving soon. I just wanted to know what I should expect...

 

Thanks!

 

:D

Link to comment
Share on other sites

Does it just bounce you out of the game into the IDE, at which point you can inspect your variables, etc.?

 

Yeap, you can do exactly this...

 

To put the breakpoint in any any line, just move your cursor to it and hit f9. (You'll see a red dot appear to the left of the line. TO get rid of it again, hit f9 again).

 

THen, if that code line get's run, execution will stop at that point, and you can do a lot of things including - yes - inspect variables.

 

A lot of 'simple' variables can just be inspected by hovering the cursor over them in the code itself. More compex data structures can be looked at by dragging them from the code into the 'watch' window. (If your watch window isn't present, go to Debug -> Windows and you can bring it up from there, along with lots of other helpful stuff)

 

Also something worth looking at sometimes is the Call Stack - very handy :) Shows you exactly which functions have been called to get to the code line your currently at...

...and if you double-click on entries in the call stack, it will jump to that function and point out the code line where it called the function lower in the stack.

Link to comment
Share on other sites

Not tricky at all.

 

Just set up dual monitors as normal (standard Windows display properties), and display the IDE on your secondary monitor ...the game will probably only run on your primary monitor. (At least this is how it is for me...)

And then, just make sure the game doesn't run in fullscreen - otherwise the screen resolution on your second monitor will probably go a bit barmy...

 

As long as you do that - dual monitor debugging goodness ;)

Link to comment
Share on other sites

Originally posted by RenegadeOfPhunk

Not tricky at all.

Oh good...

 

Just set up dual monitors as normal (standard Windows display properties), and display the IDE on your secondary monitor ...the game will probably only run on your primary monitor. (At least this is how it is for me...)

OK. I'll give it a shot. I don't currently have JKA yet, but when it arrives I'll try it out.

 

And then, just make sure the game doesn't run in fullscreen - otherwise the screen resolution on your second monitor will probably go a bit barmy...

So don't run the game in fullscreen. Gotcha.

 

As long as you know that - dual monitor debugging goodness ;)

w00t!!!!

 

Thanks!

 

:D

Link to comment
Share on other sites

OK... I just tried this out today and it is awesome - I've got the main game running on my primary display of my laptop, and the IDE is maximized on my secondary display...

 

I'm also quite impressed at the performance of the game in its windowed state - barely any lag at all!

 

This is going to help immensely. On my last round of modding for JKII, I found myself doing a multitude of debug messages to the console to track the goings-on under the hood, but now I can debug properly.

 

I'm sure I probably could have debugged the DLLs under VC6, but I really didn't know how to go about doing it, and for some reason I was not able to successfully run DLLs (only QVMs). Now, with the instructions Raven gives in the "MakeAMod_readme.txt" file, coupled the dual-monitor setup, it should go much smoother this time... ;)

 

Thanks again for the excellent tip! I'm getting excited about coding again! w00t!!!

 

:D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...