tags:

views:

256

answers:

3

I'm trying to debug some server-side JavaScript code running in Aptana Jaxer and I'm not having any success. I haven't even been able to find any tutorials or posts about this issue. Does anyone know if it's possible and if so, what am I missing?

+1  A: 

You can set you Jaxer.Config.DEV_MODE = true; to get some error information in your browser. Also use the Jaxer.Log to debug. Hope this helps a bit.

A: 

Jaxer and Aptana Studio do not yet have the ability to debug remote scripts from the client side. That is, you can't single-step into a callback and have your code window show you the first line of code in the remote method. This is on their wishlist, of course, but it'd be pretty tricky to do well.

Personally, I use logging. Jaxer has strong facilities for this, in Jaxer.Log.*.

A lot of people sneer at "printf() debugging", but the fact is, it works, and it's often less trouble to set up than an interactive debugger, especially for server applications and remote method invocation. You just sprinkle logging messages wherever you want to know the state of the system at that point, then make your app try to do the thing that's failing. Study the logs, rinse, repeat.

Warren Young
A: 

tail -f /opt/AptanaJaxer/logs/jaxer.log

gene tsai