Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

Nashorn breakpoints

$
0
0

I was trying out some of the new features in IDEA 13.1.1 (Build #IC-135,480 March 21, 2014) and can't debug a simple nashorn example.

 

Java code (NashornDemo.java):

 

<code>

package demo;

 

import javax.script.ScriptEngine;

import javax.script.ScriptEngineManager;

import javax.script.ScriptException;

import java.io.FileNotFoundException;

import java.io.FileReader;

 

public class NashornDemo {

    public static void main(String[] args) throws ScriptException, FileNotFoundException {

        ScriptEngineManager manager = new ScriptEngineManager();

        ScriptEngine engine = manager.getEngineByName("nashorn");

        engine.eval(new FileReader("src/demo/hello.js"));

    }

}

</code>
JS code (hello.js):
<code>
print("Hello World!");
</code>
I can set a breakpoint in the java file properly, but the IDEA editor won't let me set a breakpoint in the JS file. Is there something I have to do or some sort of run option needed to do this. I was trying to follow this blog:
http://blog.jetbrains.com/idea/2014/03/debugger-for-jdk8s-nashorn-javascript-in-intellij-idea-13-1/
Thanks!

Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>