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.

Bug 252933

Summary: <unknown> file is debugged instead of correct JavaScript one
Product: debugger Reporter: Jiri Kovalsky <jkovalsky>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Project reproducing strange stepping from Java to JavaScript code.
Screenshot of variable values displayed in calculator.js file while stepping happens in <unknown> file.

Description Jiri Kovalsky 2015-06-11 14:16:34 UTC
Created attachment 154165 [details]
Project reproducing strange stepping from Java to JavaScript code.

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)

Description:
============
This issue originates from bug #250263. When user wants to step from Java code into JavaScript code, NetBeans debugger for some reason opens weird <unknown> file and shows stepping progress there but it does not provide values of variables in tooltips which surprisingly work in the correct JavaScript file though. See attached screenshot.

Steps to reproduce:
===================
0. Make sure to have Truffle Debugging Support plugin installed.
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 > test > calculator.js" file in Editor.
4. Toggle line 3 breakpoint (i.e. with "if (number === 0) return 1;" code).
5. Open "Source Packages > test > TruffleCalculator.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: Focus is switched from "TruffleCalculator.java" to "calculator.js" file and its line 4 is highlighted in green color. If you hover over any "number" variable, its value is shown in tooltip.
Actual: "<unknown>" file without any syntax coloring is opened in Editor with same source as "calculator.js" file and line 4 is highlighted in green color. The source code is read-only and does not provide values of variables in tooltips.
Comment 1 Jiri Kovalsky 2015-06-11 14:17:51 UTC
Created attachment 154166 [details]
Screenshot of variable values displayed in calculator.js file while stepping happens in <unknown> file.