I started using the ScriptEngine for running javascript code. I find its very useful and good for my needs, but one thing is missing, and its debugging. How can i do it? I really wish to be able to just put a breakpoint or step-into and see the js interpreter runs my code, step by step. is that possible?
Asked
Active
Viewed 1,652 times
7
-
What version of Java? What development tools are you using? – David P. Caldwell May 09 '14 at 16:11
2 Answers
1
Admittedly, this isn't a great answer (but your question lacks some detail on what JDK or tools you're looking to debug with).
In any case, if you're using IntelliJ as your IDE it comes with a Nashorn debugger that allows you to step through both JavaScript code and any references Java code too.
More details are here: http://blog.jetbrains.com/idea/2014/03/debugger-for-jdk8s-nashorn-javascript-in-intellij-idea-13-1/

Ishan Chatterjee
- 825
- 8
- 21
0
Netbeans 8 fully supports Nashorn debugging in, through and round Java/JavaScript.

wickund
- 1,077
- 9
- 13