JEdit + TIDE debugger -- can run, but cannot step into code
by Suzanne Vogel · in Torque Game Engine · 05/04/2004 (12:43 pm) · 5 replies
Question on using jEdit with the TIDE debugger plugin, using the executable torqueDemo_DEBUG.exe.
I created a project with $(TORQUE_HOME)/examples/ as the root directory, since all the *.cs scripts are there. I set a breakpoint in the onStart() functions of both example/main.cs and example/starter.fps/main.cs, because I knew that both of these would be called by default. (I can see from example/console.log that example/starter.fps/main.cs is called.) I hit "start". Torque started the starter.fps demo, as it always does by default, but TIDE did not stop on the breakpoints.
Why isn't TIDE stopping on my breakpoint inside starter.fps > onStart()?
Thanks.
I created a project with $(TORQUE_HOME)/examples/ as the root directory, since all the *.cs scripts are there. I set a breakpoint in the onStart() functions of both example/main.cs and example/starter.fps/main.cs, because I knew that both of these would be called by default. (I can see from example/console.log that example/starter.fps/main.cs is called.) I hit "start". Torque started the starter.fps demo, as it always does by default, but TIDE did not stop on the breakpoints.
Why isn't TIDE stopping on my breakpoint inside starter.fps > onStart()?
Thanks.
About the author
#2
I put a print statement inside a function to make sure that Torque was calling it, and it is. I put a breakpoint on the line that has that print statement, but Torque didn't stop on it. The function I tried was the one that TIDE "patches" your game with, 'doEnableDebug':
// TorqueDebugPatcher begin
.....
function doEnableDebug()
{
.....
echo("blah blah blah"); // <--Torque prints this, but does not stop on breakpoint here
.....
}
// TorqueDebugPatcher end
I do have the project open that contains this file. (In fact, it's the only project in existence that I have, and it contains all *.cs files in the Torque example/ directory.)
Any other ideas why TIDE isn't stopping a breakpoint, when clearly (per print statement) execution passes through it?
Thanks!
05/05/2004 (5:50 am)
Checking again, good thought... No, my breakpoints aren't too early.I put a print statement inside a function to make sure that Torque was calling it, and it is. I put a breakpoint on the line that has that print statement, but Torque didn't stop on it. The function I tried was the one that TIDE "patches" your game with, 'doEnableDebug':
// TorqueDebugPatcher begin
.....
function doEnableDebug()
{
.....
echo("blah blah blah"); // <--Torque prints this, but does not stop on breakpoint here
.....
}
// TorqueDebugPatcher end
I do have the project open that contains this file. (In fact, it's the only project in existence that I have, and it contains all *.cs files in the Torque example/ directory.)
Any other ideas why TIDE isn't stopping a breakpoint, when clearly (per print statement) execution passes through it?
Thanks!
#3
05/05/2004 (5:58 am)
Sure, Torque is running and it prints the statement, but the game isn't running yet and my guess is that the debugger isn't running yet either... try putting it into GameConnection::createPlayer() in game.cs or some later point when the server/game/debugger are 100% up and running and see what you get then...
#4
I've since managed to "solve" the problem but not without a little hair-pulling.
In an effort to assist others and help the TIDE development team track down the bug(s) I'll describe my experience.
I installed:
j2re-1_4_2_05-windows
jEdit 4.2pre15
jEdit Project Viewer 2.0.3 plugin (according to the instructions provided)
TIDE_JEdit42 (according to the instructions provided)
.. and after:
1. Adding the cs mode (cs.xml) and updating the mode catalog
2. Copying Tide.jar, TideBrowse.jar and TideDebug.jar to C:\Program Files\jEdit
4.2pre14\jars
3. (Re)Starting jEdit and verifying that all Tide plugins were installed (according to the plugin manager, the presense of Plugins->Tide and the TIDEDebug toolbar)
all seemed to be working properly..
So, I created a new TIDE project as follows:
1. Plugins->Tide->New Project
2. Project Name: Torque Project Test2
3. Game Executable: D:\TGE\HEAD\torque\example\torqueDemo_DEBUG.exe (compiled with vc 7.1)
4. Launch Locally checked
5. Host 127.0.0.1
6. Port 28040
7. Password password
8. Replied Yes to the patching prompt
9. Chose Root directory D:\TGE\HEAD\torque\example
10. Imported ALL files
11. Opened the file D:\TGE\HEAD\torque\example\starter.fps\server\scripts\game.cs and tried to set a break point on a line in GameConnection::createPlayer
Unfortunately, were are no "little blue dots" or "little green dots" for setting breakpoints. I then tried explicitly using the "stopsign" button to add breakpoints but (much to my surprise) it created "little green dots" instead of the red breakpoint I was expecting. Note that I had to DOUBLE-CLICK the "stopsign" button (single-clicking did nothing) to make a single green dot appear.
[I was persistent and also tried the following (out of frustration):
1. "nudge the game by hitting the tilde key (~) to open the console."
2. Recompiled the buffer with Tide->TideDebug->Recompile buffer.]
I then stopped Torque using the Debug toolbar stop button and the "little green dots" I had been looking for suddenly appeared in "the gutter". I was then able to successfully set a breakpoint in GameConnection::createPlayer (game.cs) that halted execution and displayed tool tips for variables populated with legitimate data. However, after stopping Torque (again) the "little green dots" disappeared.
Needless to say, I'm disappointed that TIDE seems flakey and the documentation misleading (and incomplete). Further, the statement "When the game is puased the file that is currently executing will come to the front" simply isn't true in my case! When I press the pause button the Torque engine pauses but the currently executing file (and I'm assuming we're talking about a .cs file) doesn't magically load into jEdit.
Finally, I should mention that jEdit4.1, TIDE_JEdit4.1-bin and the supplied ProjectViewer.jar are *slightly* more reliable in terms of breakpoint appearance but still fundamentally broken.
Please debug this software and help others keep hair on their heads or tell me about the stupid mistakes I've made trying to get this *******ing thing to work properly.
07/25/2004 (8:29 pm)
I suspect Suzzane encountered a BUG(s) in TIDE that had me stumped. At first, I couldn't seem to set ANY breakpoints. However, I was able to launch and terminate the executable using the Debug toolbar.I've since managed to "solve" the problem but not without a little hair-pulling.
In an effort to assist others and help the TIDE development team track down the bug(s) I'll describe my experience.
I installed:
j2re-1_4_2_05-windows
jEdit 4.2pre15
jEdit Project Viewer 2.0.3 plugin (according to the instructions provided)
TIDE_JEdit42 (according to the instructions provided)
.. and after:
1. Adding the cs mode (cs.xml) and updating the mode catalog
2. Copying Tide.jar, TideBrowse.jar and TideDebug.jar to C:\Program Files\jEdit
4.2pre14\jars
3. (Re)Starting jEdit and verifying that all Tide plugins were installed (according to the plugin manager, the presense of Plugins->Tide and the TIDEDebug toolbar)
all seemed to be working properly..
So, I created a new TIDE project as follows:
1. Plugins->Tide->New Project
2. Project Name: Torque Project Test2
3. Game Executable: D:\TGE\HEAD\torque\example\torqueDemo_DEBUG.exe (compiled with vc 7.1)
4. Launch Locally checked
5. Host 127.0.0.1
6. Port 28040
7. Password password
8. Replied Yes to the patching prompt
9. Chose Root directory D:\TGE\HEAD\torque\example
10. Imported ALL files
11. Opened the file D:\TGE\HEAD\torque\example\starter.fps\server\scripts\game.cs and tried to set a break point on a line in GameConnection::createPlayer
Unfortunately, were are no "little blue dots" or "little green dots" for setting breakpoints. I then tried explicitly using the "stopsign" button to add breakpoints but (much to my surprise) it created "little green dots" instead of the red breakpoint I was expecting. Note that I had to DOUBLE-CLICK the "stopsign" button (single-clicking did nothing) to make a single green dot appear.
[I was persistent and also tried the following (out of frustration):
1. "nudge the game by hitting the tilde key (~) to open the console."
2. Recompiled the buffer with Tide->TideDebug->Recompile buffer.]
I then stopped Torque using the Debug toolbar stop button and the "little green dots" I had been looking for suddenly appeared in "the gutter". I was then able to successfully set a breakpoint in GameConnection::createPlayer (game.cs) that halted execution and displayed tool tips for variables populated with legitimate data. However, after stopping Torque (again) the "little green dots" disappeared.
Needless to say, I'm disappointed that TIDE seems flakey and the documentation misleading (and incomplete). Further, the statement "When the game is puased the file that is currently executing will come to the front" simply isn't true in my case! When I press the pause button the Torque engine pauses but the currently executing file (and I'm assuming we're talking about a .cs file) doesn't magically load into jEdit.
Finally, I should mention that jEdit4.1, TIDE_JEdit4.1-bin and the supplied ProjectViewer.jar are *slightly* more reliable in terms of breakpoint appearance but still fundamentally broken.
Please debug this software and help others keep hair on their heads or tell me about the stupid mistakes I've made trying to get this *******ing thing to work properly.
#5
Thoughts? Suggestions? Flames?
07/25/2004 (9:01 pm)
I just had another go after wiping the .jedit user settings directory under "Documents and Settings\Username" and things are better. It seems that I had set Utilities->Global Options->Appearance to Windows and I'm guessing the TIDE plugin doesn't work well with that "look and feel". Breakpoint anchors (little green dots) still won't appear until after Torque has run and disappear after shutdown but double-clicking the breakpoint button is no longer required (to set them). But, "When the game is puased the file that is currently executing will come to the front" is still not true but perhaps Paul meant: When the game is paused jEdit and the file in which you have set breakpoints (likely the current buffer) will take focus and the Torque window (or screen) will be minimized.Thoughts? Suggestions? Flames?
Associate Stefan Beffy Moises
but that's just a guess... you may want to set a breakpoint at some later stage...