Is it possible to interactively debug torqueDemo.exe?
by Masser · in Torque Game Engine · 11/26/2007 (7:32 pm) · 3 replies
I may be looking for too much here, but is there any way to create breakpoints and debug the torque EXE from within Visual C++ 2005 Express? My hope is to Debug (F5), step through some code and analyze some objects in the Immediate window.
I tried this by right-clicking on the EXE's properties in the Solution Explorer and setting the Configuration Settings: Debugging: Working Directory to "../example" (where I have been successfully building the EXE for some time). When I hit F5, it launches Torque and I am able to select a mission. But before it reaches my breakpoint, the entire system freezes up and I have to power down to get any response. I was hoping it would merely release control back to the IDE when it reached that point. Is this possible? Am I doing something wrong?
It's been awhile since I've debugged code of this nature, so I am likely making a very stupid mistake. Any help appreciated.
I tried this by right-clicking on the EXE's properties in the Solution Explorer and setting the Configuration Settings: Debugging: Working Directory to "../example" (where I have been successfully building the EXE for some time). When I hit F5, it launches Torque and I am able to select a mission. But before it reaches my breakpoint, the entire system freezes up and I have to power down to get any response. I was hoping it would merely release control back to the IDE when it reached that point. Is this possible? Am I doing something wrong?
It's been awhile since I've debugged code of this nature, so I am likely making a very stupid mistake. Any help appreciated.
#2
If you are running in full screen mode it is likely that the breakpoint IS being hit but the engine has complete control of the display and windows can not render on top of it. Try debugging in windowed mode.
If thats not the issue then I can't say at this time what is.
11/27/2007 (1:11 am)
Are you running the engine in fullscreen mode or windowed mode?If you are running in full screen mode it is likely that the breakpoint IS being hit but the engine has complete control of the display and windows can not render on top of it. Try debugging in windowed mode.
If thats not the issue then I can't say at this time what is.
#3
11/27/2007 (8:06 am)
Thanks guys. I made a really stupid rookie mistake. You hit it, Brian. I was running in full screen mode and didn't realize I hadn't tried it in windowed mode. It seems to work fine now.
Torque Owner Jason Gossiaux
Indie Dev
I loaded the project up in VC++ 2005 Express and selected the DEBUG configurating from the Configuration Manager (found along the top bar of the IDE as a dropdown containing DEBUG, DEBUG Fast Relight and RELEASE), then hit the play icon.
This will compile, link and launch the torque project. Keep in mind you can only breakpoint inside the C++ functions, you can't set breakpoints in Torquescript files. I wouldn't know where to begin setting breakpoints if you are trying to analyze the engine's state machine. For my own use I've been breakpointing a lot inside the sgSceneLighting.cc files because I know when they are being called. What you might try doing is setting up a console function that is called from a GUIMenu button push, and putting the breakpoint inside of that.
I was really impressed with how easy debugging as been, though a bit underwhelmed with the debugger performance. I go from 160fps in a release build down to 25fps when in a debug build. But, its usable.