Game Development Community

xcode script debugging

by Laban · in iTorque 2D · 05/15/2011 (6:09 am) · 10 replies

Currently I can build/deploy and place breakpoints in the engine code in xcode 4. But breakpoints in scripts or any changes to a script is ignored.

How does one go about to set up xcode so script-debugging/compiling is achieved? Or if this is not possible what is the recommended alternative?

Thank you.

#1
05/15/2011 (8:06 am)
@Laban - Xcode does not support TorqueScript debugging. A lot of Torque developers use Codeweaver. I do not know what the status is for the software or if it works for iTorque 2D.

As for changes being ignored, you typically need to delete any DSO files that were generated, then run the stand alone app again. This will add new DSOs to Xcode and reflect the changes.
#2
05/15/2011 (9:30 am)
Thank you for your reply. Codeweaver/TorqueDev seems to be geared towards Windows though.

If I could build the whole thing on Windows with Torsion this would not be a big problem, but there is a lot of stuff such as input that is better done on Mac, since it doesn't work on Windows.

Surely someone must have figured out a clever way to debug on Mac?
#3
05/15/2011 (12:39 pm)
I do not know if what you are requesting is possible. I tend to use t2dAssert's in the script to help catch errors and always keep a tail running that greps the log for errors. Not as good as break points, but at least a step in the right direction.
#4
05/16/2011 (5:22 am)
I have been working through this as well.

I got Torsion sitting on Crossover to work on my Mac. But it does not debug very nicely to my IPhone app, once a breakpoint is hit the application jumps all over the place. I tried the same using windows Torsion to Iphone app and it works just fine. I can remote to my PC but what a pain!

I tried Codeweaver on the mac but it would not run(on crossover or boxer). It works on Windows and has a better code sense to tell us what functions are doing etc, but it does appear to cater for IPhone debugging as you cannot connect to a running application it wants to start an application.

I am looking at JEdit (cause that is java so run anywhere) I did fool it into thinking I had an exe and could then actually debug. A pretty editor too. However, regardless of what I do recompiling buffers etc it does not pick up my breakpoints. I will keep looking at this, as there might be hope here!

So not great news if you are doing as I am, developing an IPhone app and wanted to just use your mac to debug.

Hopefully someone has this all running great and can let us know.

#5
05/16/2011 (3:03 pm)
@Nigel

See comment #3 for debug tools

www.garagegames.com/community/forums/viewthread/125690/

Myself I use Torsion in Windows, then deploy to Mac/iPhone.
#6
05/17/2011 (11:12 am)
Thanks for replies.

Seems best to do as much as possible in Windows with Torsion and just do accelerometer and audio stuff on the Mac using echo for old-style debugging.
#7
05/17/2011 (3:07 pm)
I have some more digging on this. Last night I installed VMWare fusion and got a windows install working on my Mac. The cool thing about fusion is that you can share directories between windows and mac meaning that you can use one set of source.

VMWare costs a bit and so does a windows license if you do not have a spare but I finally feel I have a fully setup environment.

I might still use TorqueDev for some of the editing, again looking at the same source because it is the most 'intelligent' editor when writing the script and good for simulation debugging. But debugging on the IPhone will fall to Torsion.

Good luck with your setup and please come back with improvements on my setup.
#8
05/17/2011 (3:39 pm)
@Nigel

VirtualBox is another virtualization option for running Windows in the Mac. It has a "Seamless Mode" where the Windows apps are integrated in the Mac desktop.
#9
05/17/2011 (4:10 pm)
Pedro,

Ah! and its free :) thanks I was wondering what I would do at the end of my 30 day trial. Can you just confirm that you have this working with Torsion and can debug to a remote system such as an IPhone? I know VMWare works but if this does too, that would be cool. Any gotchas to watch out for or just a standard install, point at remote IP and go?

thanks

Nigel
#10
05/17/2011 (4:37 pm)
Hi Nigel

Yes, it works with Torsion just fine. I tried it some time ago with Torque2D actually. Right now my setup is a dedicated Windows box (with Torsion), a source control system on a server, then deploy to Mac/iPhone with source updates.