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 151854 [details] Project reproducing the described inability to step through JavaScript code. Product Version: NetBeans IDE Dev (Build 201502060001) Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17 System: Linux version 3.13.0-24-generic running on amd64; UTF-8; en_US (nb) Description: ============ It is not possible to use "Step Into" action to call JavaScript function from Java code. The JavaScript code is simply executed as with "Step Over" action. I can't even get breakpoints in that JavaScript file working. I doubt it is a configuration issue though. Steps to reproduce: =================== 1. Using "Tools > Java Platforms" register latest version of Truffle JDK 8. 2. Open attached project, invoke its "Properties" and in "Libraries" category make sure it uses the Truffle JDK 8. 3. Open "Source Packages > javaapplication10 > calculator.js" file in Editor. 4. Toggle line 3 breakpoint (i.e. with "if (number === 0) return 1;" code). 5. Open "Source Packages > javaapplication10 > JavaApplication10.java" file in Editor. 6. Toggle line 29 breakpoint (i.e. with "Object result = inv.invokeFunction("calculateFactorial", 4);" code). 7. Press Ctrl+F5 to start debugging session. 8. When Java debugger hits line 29 breakpoint press F7 to step into the JavaScript code. Expected: Editor switches focus to calculator.js with caret highlighting first line of calculateFactorial() function. Pressing F5 would hit line 3 breakpoint in that calculator.js file. Actual: Caret is moved to line 30 in JavaApplication10 and Debugger Console contains message "Thread main stopped at JavaApplication10.java:30.".
This is fixed by changeset: 287883:9a55763f3a75 http://hg.netbeans.org/core-main/rev/9a55763f3a75 There are some workarounds in the code, the Truffle debugging support might be further modified.
I apologize for bad news but I see no difference in the behaviour. Reopening for further investigation. Product Version: NetBeans IDE Dev (Build 201506100001) Java: 1.7.0_76; Java HotSpot(TM) 64-Bit Server VM 24.76-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_76-b13 System: Linux version 3.13.0-37-generic running on amd64; UTF-8; cs_CZ (nb)
My fault. I didn't have Truffle Debugging Support plugin installed. It kind of works with the plugin, but not the natural way though. When F7 is pressed, "<unknown>" file is opened in Editor with all code in grey background color and line 3 highlighted in green. No tooltips with variable values are provided. If you switch to "calculator.js" file, it looks like line 3 breakpoint is not hit as its color is red but on the other hand if you hover over "number" variable, you will see "number = 4" in the displayed tooltip. Can you please make sure this anomaly is fixed too? Thanks.
The step into itself seems to work fine already, the problem with a read-only version of the file is submitted in issue #252933. The problem with tooltips is a result of a missing .js extension in the "<unknown>" file name. This is to be fixed in Truffle.
Verifying then, thanks.