debugging - How to debug JavaScript program using Nashorn? - Stack Overflow

I need to be able to Debug JS code run by Nashorn i.e:ScriptEngineManager sem = new ScriptEngineManager

I need to be able to Debug JS code run by Nashorn i.e:

ScriptEngineManager sem = new ScriptEngineManager();
ScriptEngine engine = sem.getEngineByName("nashorn");
engine.eval("load (\"src//sap/rdl/runjs/file.js\");");

Now I need to add a breakpoint in the JS file and be able to step through the lines programmatically (implement a debugger).

I know intelliJ and NetBeans implemented this so it should be possible, yet I cannot find any API in Nashorn that allows stepping and/or mapping of lines or variables.

Any advice/links would be most wele. Thanks in advance.

I need to be able to Debug JS code run by Nashorn i.e:

ScriptEngineManager sem = new ScriptEngineManager();
ScriptEngine engine = sem.getEngineByName("nashorn");
engine.eval("load (\"src//sap/rdl/runjs/file.js\");");

Now I need to add a breakpoint in the JS file and be able to step through the lines programmatically (implement a debugger).

I know intelliJ and NetBeans implemented this so it should be possible, yet I cannot find any API in Nashorn that allows stepping and/or mapping of lines or variables.

Any advice/links would be most wele. Thanks in advance.

Share Improve this question edited Sep 9, 2014 at 10:14 Dmytro Plekhotkin 2,0032 gold badges25 silver badges47 bronze badges asked Sep 8, 2014 at 15:09 Sergey KupermanSergey Kuperman 511 silver badge2 bronze badges 3
  • Have the same problem - stackoverflow./questions/25791772/… . The ide stackoverflow answer I referenced there may be helpful to you. – Steve B. Commented Sep 11, 2014 at 15:47
  • 1 @SteveB. your link is dead. – planty182 Commented Oct 7, 2015 at 12:44
  • @planty182: web.archive/web/20150426130812/http://stackoverflow./… – Mathieu Larose Commented Feb 23, 2016 at 19:52
Add a ment  | 

1 Answer 1

Reset to default 5

You can debug your code in Intellij IDEA.

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

Also, you can try to use askari. It's a prototype that allow you to step through JavaScript code

https://github./wickund/nashornexamples/tree/master/askari

Cheers, Vik

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745395453a4625856.html

相关推荐

  • debugging - How to debug JavaScript program using Nashorn? - Stack Overflow

    I need to be able to Debug JS code run by Nashorn i.e:ScriptEngineManager sem = new ScriptEngineManager

    8小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信