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?
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With