This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 142641 [details] sample project Please check this sample project, I have JS breakpoints in test1.js file on lines: - 8, 51, 69, 72, 77 and no Java breakpoint, if I debug the project, none of these JS breakpoints are hit, all are ignored. If I add line breakpoint to SampleRunner.java:51 and press Step into several times once it is hit, new editor tab (read-only) called <eval>.js is opened but without any line breakpoint (no visual marks). If I create a LB in this eval tab, its file is set to js-scripts://fs1/74b36706/%3ceval%3e.js Product Version: NetBeans IDE Dev (Build 201311270002) Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Created attachment 142642 [details] IDE log
Created attachment 142643 [details] sample project - better I've tried to switch IDE to jdk8, no change.
The problem is in the way how do you run the JS script: engine.eval(new FileReader("src" + System.getProperty("file.separator") + "javascript_sample" + System.getProperty("file.separator") + "test1.js")); The JavaScript is read from some reader, which happens to read from some particular file. But to bind the evaluation string with the file is almost impossible for the debugger. It can be read from some web location, from a memory, or generated on the fly. In this case it's read from a file, but at the end, we get some script with unknown source URL, obviously. If you step into the script from Java code, an <eval> source is opened and breakpoints on the given locations do work fine for me. Then if you remove any Java breakpoints, the breakpoints in <eval> script do work even after NetBeans restart. To keep the association of the script with the file, use evaluation like String sourceFile = "src" + System.getProperty("file.separator") + "javascript_sample" + System.getProperty("file.separator") + "test1.js" engine.eval("load(\""+sourceFile+"\");");
Thank you for explanation, I was afraid I was doing it wrong. I've found this way in some documentation. Breakpoints in <eval> work for me as well.
I seem to have this problem when I set my breakpoint in a file, but I load the class resource version of the file? Is there any way to detect that they are the same file? Example: library/src/com/example/library.js I compile the library then later on I load it's class resource version since the library was compiled as a jar: this.engine.eval(new URLReader( getClass().getResource("library.js") )); The breakpoint in my file doesn't trigger in the embedded files execution. It works if I instead do: File f = new File( "../library/src/com/example/library.js" ); this.engine.put("liburl", f); this.engine.eval("load( liburl );"; This work around however will not work when remote debugging as the file won't be there on the target, the target will only have the compiled jar with the JS file inside the jar.
Mozilla firefox free download latest version https://foxdownload.org join this site and installing this new web browser in your mobile.