JEdit / TIDE improvements for TGB, T2D, T3D etc.
by Stefan Beffy Moises · 02/07/2010 (6:56 pm) · 23 comments
Hey there,
today I have updated the TIDE plugins for JEdit to simplify the debugging of any Torque related project.
TIDE is a JEdit plugin suite that adds support for TorqueScript editing, syntax highlighting, project management and remote script debugging and therefore is available for Windows, Mac and Linux.
Before the update, TIDE tried to add various little pieces of code to different parts of the main.cs file, which was doomed to fail for many non-TGE based projects or wíth any engine update and general changes to main.cs... e.g. it didn't work for TGB flavoured games since the main.cs file is quite different to TGE.
Now it works just like Torsion (hope the guys don't mind :)) - it adds one single line of script to the main.cs file when the game is launched from withing JEdit for debugging which is removed at the end of the debugging session (when the game exits). Much cleaner and should work for any current and future Torque engine :) Well, as long as the "dbgSetParameters()" function is available that is :)
I will update the downloads in the next days, stay tuned for updates here!

today I have updated the TIDE plugins for JEdit to simplify the debugging of any Torque related project.
TIDE is a JEdit plugin suite that adds support for TorqueScript editing, syntax highlighting, project management and remote script debugging and therefore is available for Windows, Mac and Linux.
Before the update, TIDE tried to add various little pieces of code to different parts of the main.cs file, which was doomed to fail for many non-TGE based projects or wíth any engine update and general changes to main.cs... e.g. it didn't work for TGB flavoured games since the main.cs file is quite different to TGE.
Now it works just like Torsion (hope the guys don't mind :)) - it adds one single line of script to the main.cs file when the game is launched from withing JEdit for debugging which is removed at the end of the debugging session (when the game exits). Much cleaner and should work for any current and future Torque engine :) Well, as long as the "dbgSetParameters()" function is available that is :)
I will update the downloads in the next days, stay tuned for updates here!

About the author
#2
02/08/2010 (3:22 pm)
cool thanks for the update. :P
#4
Looks like a great improvement and a good solution for those on Mac or not able to buy a copy of Torsion.
02/08/2010 (11:25 pm)
The more tools the better.Looks like a great improvement and a good solution for those on Mac or not able to buy a copy of Torsion.
#5
02/09/2010 (12:16 pm)
Cool. Are the plugin and jEdit completely free?
#7
@Kevin: not yet, I'm doing some final tests since I have also updated all 3rd party plugins used and I had to adjust some TIDE code for that, too.
But I'll upload everything to Sourceforge tomorrow I think.
02/09/2010 (3:50 pm)
@Glen: yes, both free and open source@Kevin: not yet, I'm doing some final tests since I have also updated all 3rd party plugins used and I had to adjust some TIDE code for that, too.
But I'll upload everything to Sourceforge tomorrow I think.
#8
I found out this tool today before seeing this post and I tried the version currently on the site, 1.3, in the Mac.
I use Torsion in Windows, but now I have to port my game to the Mac and it seems that this tool is the only TGB debugger available for the Mac.
I am using TGB 1.7.4
I followed the instructions on this document
torqueide.sourceforge.net/docs/using.html
I created a new TIDE project in the menu “Plugins -> Tide -> New Project” of JEdit
After selecting the game executable, I am prompted if I want to game script to be patched.
At this point there are no files loaded in TideBrowse, JEdit does not load any of the *.cs files after setting the extensions in “Import”
Choosing yes, I get this message
Choosing No, and then trying to run the game (by selecting the “start” arrow) I have a message of “cannot launch executable, permission denied, error 13”
Any chance that you upload the new version soon :-) ?
Thanks for the great tool.
02/09/2010 (10:55 pm)
Hello, StefanI found out this tool today before seeing this post and I tried the version currently on the site, 1.3, in the Mac.
I use Torsion in Windows, but now I have to port my game to the Mac and it seems that this tool is the only TGB debugger available for the Mac.
I am using TGB 1.7.4
I followed the instructions on this document
torqueide.sourceforge.net/docs/using.html
I created a new TIDE project in the menu “Plugins -> Tide -> New Project” of JEdit
After selecting the game executable, I am prompted if I want to game script to be patched.
At this point there are no files loaded in TideBrowse, JEdit does not load any of the *.cs files after setting the extensions in “Import”
Choosing yes, I get this message
Patch Failed: Unable to apply all patches
Choosing No, and then trying to run the game (by selecting the “start” arrow) I have a message of “cannot launch executable, permission denied, error 13”
Any chance that you upload the new version soon :-) ?
Thanks for the great tool.
#9
Not sure about the "permission denied" though, I have another MAC user reporting this problem currently (also using the "old" version of TIDE), but I'm not sure what to do there since I don't have a MAC ... can you just change the permissions for the executable?
02/10/2010 (4:53 am)
Hi Pedro, I'm going to upload the update today, that should fix the patching problems since there is no patching anymore :) I'll post here once it's online.Not sure about the "permission denied" though, I have another MAC user reporting this problem currently (also using the "old" version of TIDE), but I'm not sure what to do there since I don't have a MAC ... can you just change the permissions for the executable?
#11
02/10/2010 (8:02 am)
@Pedro: if you still get the "permission denied" error, open up a console and go into your TGB project directory (or whereever the executable is on MAC :P) and make all files in there executable with:chmod * +xLet me know if this helps.
#12
1) In the MAC, I still have the message
"This error received connecting to Torque Debugger"
"Unable to launch game: <my game path>"
"Error Message: Cannot run program <my game path>: error=13, Permission denied"
I have my permissions set to execute (and I can run the program outside TIDE)
I can Toggle breakpoints in JEdit
2) In Windows, I can run and step in the code with the debugger
but I cannot set breakpoints (by clicking on the read circle)
I also have some java error messages, I can send them by email
Thanks again
02/10/2010 (1:38 pm)
thanks for the new version1) In the MAC, I still have the message
"This error received connecting to Torque Debugger"
"Unable to launch game: <my game path>"
"Error Message: Cannot run program <my game path>: error=13, Permission denied"
I have my permissions set to execute (and I can run the program outside TIDE)
I can Toggle breakpoints in JEdit
2) In Windows, I can run and step in the code with the debugger
but I cannot set breakpoints (by clicking on the read circle)
I also have some java error messages, I can send them by email
Thanks again
#13
As for the MAC problem... I have no idea then :(
Any MAC experts around?
02/10/2010 (4:23 pm)
Hi Pedro, did you retry on Windows after a JEdit restart? I wasn't able to set Breakpoints once, but after a restart it was working again...As for the MAC problem... I have no idea then :(
Any MAC experts around?
#14
02/10/2010 (4:41 pm)
@Pedro: also, keep in mind that the current project (or any subfolder or file) has to be selected in the Project Viewer to set breakpoints in any project file, otherwise TIDE doesn't know which project it's in.
#15
in your user home directory, create a new file (if not there already):
and add something like
02/10/2010 (4:59 pm)
The only thing I found concerning permission denied errors in conjunction with Java calls to "Runtime.exec()" (which TIDE uses to launch the game) on MAC OS is that it should help to set the security settings for Java apps:in your user home directory, create a new file (if not there already):
/home/your_user_name/.java.policy(or whereever your HOME dir is on MAC...)
and add something like
grant {
permission java.io.FilePermission "/path/to/your/tgb/directory/*", "read,write,execute,delete";
};Maybe this helps...
#16
Google is your friend, and it seems that that error 13 is a
java.io.IOException: error=13, Permission denied.
www.jetbrains.net/devnet/thread/276338
don't know how to fix it though.
Could it be that you are modifying main.cs , and by default I don't have write permissions on the new file ?
I did a svn checkout from your source code repository, and I'll try to see the issue.
On the Mac I also cannot load any file into the Project Viewer, I might be doing something wrong.
In Windows, I do load the files in the Project Viewer. The breakpoints seem to be working only for one function (?). I can toggle them in all the files, but when I run the debugger, it only stops at that function :-)
Do you have an email where we could discuss this off thread?
Thanks
02/10/2010 (5:10 pm)
Hi StefanGoogle is your friend, and it seems that that error 13 is a
java.io.IOException: error=13, Permission denied.
www.jetbrains.net/devnet/thread/276338
don't know how to fix it though.
Could it be that you are modifying main.cs , and by default I don't have write permissions on the new file ?
I did a svn checkout from your source code repository, and I'll try to see the issue.
On the Mac I also cannot load any file into the Project Viewer, I might be doing something wrong.
In Windows, I do load the files in the Project Viewer. The breakpoints seem to be working only for one function (?). I can toggle them in all the files, but when I run the debugger, it only stops at that function :-)
Do you have an email where we could discuss this off thread?
Thanks
#17
hm, I guess I have to borrow a MAC :P
Well, yes, maybe it's the main.cs... or the folder containing the files since TIDE also creates new files for backups etc. - did you try to set write/execute rights for the whole folder recursively?
I can definately set more than one breakpoint (did you try the exact same spots in Torsion? Maybe TGB doesn't allow breakpoints there?) and I don't have issues with the project viewer...
You can contact me via the email you've used and that's in the readme files :)
02/10/2010 (5:36 pm)
Hi Pedro,hm, I guess I have to borrow a MAC :P
Well, yes, maybe it's the main.cs... or the folder containing the files since TIDE also creates new files for backups etc. - did you try to set write/execute rights for the whole folder recursively?
I can definately set more than one breakpoint (did you try the exact same spots in Torsion? Maybe TGB doesn't allow breakpoints there?) and I don't have issues with the project viewer...
You can contact me via the email you've used and that's in the readme files :)
#19
I reinstalled everything on the Mac. I can now see the files in Project Viewer.
But I still have the same permissions error ( I did create that .java.policy in my $home dir, and did chmod -Rv 755 * in my game folder)
Here are some java error messages from the console
When I toggle a breakpoint
3:41:09 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: Toggle it!!!
and when I try ro run
3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.io.IOException: Cannot run program "/Users/ProgrammingMachine/home/git_copy/games/TGBNumberSense/TGBGame.app" (in directory "/Users/ProgrammingMachine/home/git_copy/games/TGBNumberSense"): error=13, Permission denied
3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
I'll send you the complete log errors by email, thanks
02/10/2010 (6:07 pm)
Hi StefanI reinstalled everything on the Mac. I can now see the files in Project Viewer.
But I still have the same permissions error ( I did create that .java.policy in my $home dir, and did chmod -Rv 755 * in my game folder)
Here are some java error messages from the console
When I toggle a breakpoint
3:41:09 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: Toggle it!!!
and when I try ro run
3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.io.IOException: Cannot run program "/Users/ProgrammingMachine/home/git_copy/games/TGBNumberSense/TGBGame.app" (in directory "/Users/ProgrammingMachine/home/git_copy/games/TGBNumberSense"): error=13, Permission denied
3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
I'll send you the complete log errors by email, thanks
#20
here's the java code that triggers the error, at TorqueDebug.java:333
02/10/2010 (6:31 pm)
this might be useful too3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.lang.Runtime.exec(Runtime.java:593) 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at com.garagegames.torque.TorqueDebug.launchGame(TorqueDebug.java:333) 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at com.garagegames.torque.TorqueDebug.create(TorqueDebug.java:128) 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at com.garagegames.torque.TorqueDebug.create(TorqueDebug.java:161) 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at com.garagegames.torque.tide.Tide.start(Tide.java:599) 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: 3:42:10 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at com.garagegames.torque.tidedebug.TideDebug.start(TideDebug.java:123)
here's the java code that triggers the error, at TorqueDebug.java:333
try
{
gameProcess = rt.exec(gameCommand, null, options.gamePath.getParentFile());
}
catch (IOException ioe)
{
listener.createFailed(new TorqueDebugException("Unable to launch game: "
+ options.gamePath.getAbsolutePath() + "\n" + "Error Message:"
+ ioe.getMessage()));
ioe.printStackTrace();
} 
Torque Owner Shaderman