Debugging a Java ScriptEngine Object

I started using ScriptEngine to run javascript code. I find it very useful and useful for my needs, but something is missing and debugging it. How can I do it? I really want to be able to just set a breakpoint or step by step and see that the js interpreter runs my code, step by step. perhaps?

+6
source share
2 answers

Admittedly, this is not a big answer (but your question lacks some details about what the JDK or the tools you want to debug).

In any case, if you use IntelliJ as your IDE, it comes with a Nashorn debugger that allows you to execute both JavaScript code and any links to Java code.

More details here: http://blog.jetbrains.com/idea/2014/03/debugger-for-jdk8s-nashorn-javascript-in-intellij-idea-13-1/

+1
source

Netbeans 8 fully supports Nashorn debugging using Java and JavaScript.

0
source

Source: https://habr.com/ru/post/958723/


All Articles