如何在Aptana Jaxer中调试服务器端代码?

时间:2021-10-05 03:28:15

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?

我正在尝试调试在Aptana Jaxer中运行的一些服务器端JavaScript代码,但我没有取得任何成功。我甚至都找不到有关此问题的任何教程或帖子。有谁知道它是否可能,如果是的话,我错过了什么?

3 个解决方案

#1


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.

你可以设置Jaxer.Config.DEV_MODE = true;在浏览器中获取一些错误信息。还可以使用Jaxer.Log进行调试。希望这个对你有帮助。

#2


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.

Jaxer和Aptana Studio还没有能力从客户端调试远程脚本。也就是说,您不能单步进入回调并让代码窗口显示远程方法中的第一行代码。当然,这是他们的愿望清单,但要做得好是非常棘手的。

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

就个人而言,我使用日志记录。 Jaxer在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.

很多人都嘲笑“printf()调试”,但实际情况是,它可以工作,而且设置比交互式调试器更麻烦,特别是对于服务器应用程序和远程方法调用。您只需将日志消息传递到您想知道系统状态的任何位置,然后让您的应用尝试执行失败的操作。研究原木,冲洗,重复。

#3


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

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

#1


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.

你可以设置Jaxer.Config.DEV_MODE = true;在浏览器中获取一些错误信息。还可以使用Jaxer.Log进行调试。希望这个对你有帮助。

#2


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.

Jaxer和Aptana Studio还没有能力从客户端调试远程脚本。也就是说,您不能单步进入回调并让代码窗口显示远程方法中的第一行代码。当然,这是他们的愿望清单,但要做得好是非常棘手的。

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

就个人而言,我使用日志记录。 Jaxer在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.

很多人都嘲笑“printf()调试”,但实际情况是,它可以工作,而且设置比交互式调试器更麻烦,特别是对于服务器应用程序和远程方法调用。您只需将日志消息传递到您想知道系统状态的任何位置,然后让您的应用尝试执行失败的操作。研究原木,冲洗,重复。

#3


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

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