Enhanced TelnetDebugger
by Tom Spilman · 07/19/2005 (3:34 am) · 102 comments
Download Code File
*** This resource is obsolete and the code is now included in all shipping versions of the Torque engine ***
Thanks to all the community members that made this resource possible!
Team Sickhead

*** This resource is obsolete and the code is now included in all shipping versions of the Torque engine ***
Thanks to all the community members that made this resource possible!
Team Sickhead

About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
#22
07/24/2005 (9:05 pm)
@Tom - Nice work Tom. I appreciate you taking the time to work this through. I realize your probably really busy -- with Torsion and this.
#23
It took me a while to work out that the changed eval() was why the world editor creator script had broken :)
Great work on the editor btw - much better than working in notepad!
07/25/2005 (1:17 pm)
@TomIt took me a while to work out that the changed eval() was why the world editor creator script had broken :)
Great work on the editor btw - much better than working in notepad!
#24
T2D Engine initialized...
Debugger connection from 127.0.0.1
Exporting client prefs
Exporting client config
Exporting client prefs
Exporting client config
Exporting client prefs
Exporting client config
Exporting client prefs
Exporting server prefs
Shutting down the OpenGL display device...
Making the GL rendering context not current...
Deleting the GL rendering context...
Releasing the device context...
07/28/2005 (10:12 am)
Torsion does not work, out of the box, connecting to T2D ( I have not appled the Enhanced Telnet debugger patches yet). Here is the tail end of of my console.log where T2D shuts down (not a crash- it seems to be a clean shutdown)T2D Engine initialized...
Debugger connection from 127.0.0.1
Exporting client prefs
Exporting client config
Exporting client prefs
Exporting client config
Exporting client prefs
Exporting client config
Exporting client prefs
Exporting server prefs
Shutting down the OpenGL display device...
Making the GL rendering context not current...
Deleting the GL rendering context...
Releasing the device context...
#25
I'm still working on an update to fix this (ran into a problem with my last fix for it). Anyway it's looking solid now. The resource should be updated very soon and we'll know if we need to investigate further into your issue.
Sorry for the delay guys, but touching Torque's guts is a delicate affair.
07/28/2005 (12:08 pm)
@Alex - This *might* be related to the same bug as Drew & Steve have encountered above. Do you happen to have an critical eval() call in your main.cs?I'm still working on an update to fix this (ran into a problem with my last fix for it). Anyway it's looking solid now. The resource should be updated very soon and we'll know if we need to investigate further into your issue.
Sorry for the delay guys, but touching Torque's guts is a delicate affair.
#26
Is any chance this patch could cause the engine to report the following error message:
"Error, no last element of zero sized array" ? I'm using the TSDev IDE.
The above error usually show up after I trace into a breakpoint and try to continue the application. Thanks in advance.
07/31/2005 (7:20 am)
@Tom:Is any chance this patch could cause the engine to report the following error message:
"Error, no last element of zero sized array" ? I'm using the TSDev IDE.
The above error usually show up after I trace into a breakpoint and try to continue the application. Thanks in advance.
#27
07/31/2005 (9:42 pm)
@Tom- I don't think I'm using eval() anywhere. I'll try again soon any let you know if I can get it working
#28
@Drew & Steve - This update has the fix for your bugs... please let me know if this doesn't correct your problem.
@Steven - I believe that the previous version could do that in some cases as the callstack was being incorrectly managed. Try the new update.
@Alex - Try this new update and let me know if the issue continues.
07/31/2005 (9:50 pm)
First off i just updated the zip with some fixes and features, so reinstall the update and check it out. Also be sure to do delete all DSOs in your project (in Torsion hit the Project->Delete All DSOs menu).@Drew & Steve - This update has the fix for your bugs... please let me know if this doesn't correct your problem.
@Steven - I believe that the previous version could do that in some cases as the callstack was being incorrectly managed. Try the new update.
@Alex - Try this new update and let me know if the issue continues.
#29
Oops my mistake! I got back from vacation and tried again and using T2D, unpatched, and the Torsion alpha release the debugger works beautifully. Nice job Tom! I think what threw me is I did not know that it was going to auto-patch my main.cs with the dbgSetParameters() and so I must have cancelled out when I saw the strange port number and username/password in that dialog. It did not succeed in connecting to my own port and password that I had specified. Maybe the auto-insertion of the dbgSetParameters() should be a preference.
Anyways Torsion is looking awesome and I haven't even tried using the enhanced debugger code!
07/31/2005 (10:34 pm)
I wrote Quote:Torsion does not work, out of the box, connecting to T2D ( I have not appled /edit: not applied/ the Enhanced Telnet debugger patches yet). Here is the tail end of of my console.log where T2D shuts down (not a crash- it seems to be a clean shutdown)
Oops my mistake! I got back from vacation and tried again and using T2D, unpatched, and the Torsion alpha release the debugger works beautifully. Nice job Tom! I think what threw me is I did not know that it was going to auto-patch my main.cs with the dbgSetParameters() and so I must have cancelled out when I saw the strange port number and username/password in that dialog. It did not succeed in connecting to my own port and password that I had specified. Maybe the auto-insertion of the dbgSetParameters() should be a preference.
Anyways Torsion is looking awesome and I haven't even tried using the enhanced debugger code!
#30
07/31/2005 (10:40 pm)
@Alex - The next update will make the injection of dbgSetParameters optional. I'll be adding some instructions on a couple of alternate ways to do it and their pros and cons. Now if you haven't tried the telnet debugger update then your in for an even better experience... without the update the TelnetDebugger really sucks.
#31
Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]);
does not work. 4 errors on that line, dont think it goes on 346 but i dont see where else to put it.
07/31/2005 (11:12 pm)
hmmm either im real stupid or the zip is still the old one (probably me). Im getting all the same problems posted previously and had to manually fix them. Im now stuck where Brian Peal was on Jul 24, 2005 at 18:06. Also, the line:Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]);
does not work. 4 errors on that line, dont think it goes on 346 but i dont see where else to put it.
#32
07/31/2005 (11:16 pm)
@Andrew - My guess is you're using TGE 1.3. I should have included a seperate folder for it, but i got lazy. For 1.3 use your original main.cc and change the line...Con::executef(2, "eval", script);to this
Con::evaluate(script, false, "main.cs");If we're lucky this resource will end up as part of 1.4 final.
#33
on main.cc change lines 412 & 449 which currently read
shutdownGame();
to
shutdownGame(argc, argv);
then
Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]);
will compile as expeted.
07/31/2005 (11:19 pm)
Ok here's the fix.on main.cc change lines 412 & 449 which currently read
shutdownGame();
to
shutdownGame(argc, argv);
then
Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]);
will compile as expeted.
#34
Nope, same thing as original, quickly exits. trying yours....
nope
C:\Torque\SDK\engine\game\main.cc(347): error C2065: 'script' : undeclared identifier
07/31/2005 (11:23 pm)
WOW! your fast brother :) Im getting ready to run mine, lets see if it works......Nope, same thing as original, quickly exits. trying yours....
nope
C:\Torque\SDK\engine\game\main.cc(347): error C2065: 'script' : undeclared identifier
#35
07/31/2005 (11:41 pm)
@Andrew - Something else must be going on... i quickly ran the TGE 1.3 installer (you are using 1.3 right?) and looked at main.cc. If you revert to the original 1.3 main.cc and just change line 323 as i posted above it should compile just fine.
#36
08/01/2005 (4:48 am)
After applying the new patch, the error message do not show up but the engine still crash in the debugging. Hope the next patch will solve this issue.
#37
08/01/2005 (7:30 am)
@Steven - Could you get me more details on your crash? Is this TGE 1.4, TGE 1.3, TSE, or T2D? What is in the console log? Have you tried using a debug Torque EXE? Do you get any assert windows? When it crashes can you debug the crash? What source file and line number is it crashing in?
#38
I didn't have time to check out just what was going on, but tonight; I'll look and see if I can find out just wants happening.
I did delete all .dso. and they all compiled without errors.
08/01/2005 (9:59 am)
@Tom. At lunch, I loaded the new update. My bug is fixed-- but it has introduced another bug. I have an GuiObjectView which gets loaded from script. when the function GuiObjectView::meshObjects::load gets called, all the parms are blank. I didn't have time to check out just what was going on, but tonight; I'll look and see if I can find out just wants happening.
I did delete all .dso. and they all compiled without errors.
#39
08/01/2005 (10:37 am)
@Steve - I quickly looked at the guiObjectView resource and nothing really jumped out at me as to why this would occur. guiObjectView.setObject() is what ends up calling GuiObjectView::meshObjects::load() and is no different from any of the hundreds of ConsoleMethod calls in Torque. What does your guiObjectView.setObject() call look like?
#40
The world editor creator script now works OK with the updated files.
08/01/2005 (10:48 am)
I have it working fine with 1.3 (including the changed line in main.cc).The world editor creator script now works OK with the updated files.

Associate Tom Spilman
Sickhead Games
to this
@Drew & Steve - I've fixed the bug you guys were experiencing and will have the resource updated as soon as i can. I need to make another little fix, validate a new bug fix i put in there, and hammer on it a bit.