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 239382 - Nashorn debugging shows wrong eval script
Summary: Nashorn debugging shows wrong eval script
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks: 240183
  Show dependency tree
 
Reported: 2013-12-11 15:56 UTC by Jaroslav Tulach
Modified: 2014-01-11 04:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample project mixing Java and JavaScript (1.19 MB, application/zip)
2013-12-11 15:56 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2013-12-11 15:56:14 UTC
Created attachment 143072 [details]
Sample project mixing Java and JavaScript

Tested on own build from Dec 11, 2013. Run NetBeans on JDK8, open attached project. Find AbstrPrsntrNGTest class and put breakpoint to line 114.

Debug the test.

When the breakpoint is hit look at the string to evaluate and step into JavaScript. The right source is displayed.

Continue few times, until different script is about to be evaluated. Step in. The previous script is shown instead of the new one.
Comment 1 Martin Entlicher 2014-01-07 08:22:54 UTC
This should be fixed by
http://hg.netbeans.org/core-main/rev/d56364e7d1f3
Comment 2 Jaroslav Tulach 2014-01-09 13:20:43 UTC
Debugging the sample project still does not work for me.
Comment 3 Martin Entlicher 2014-01-09 13:55:27 UTC
Yes, reproduced, I'm sorry, eval shows the first content each time.
Comment 4 Martin Entlicher 2014-01-09 16:59:56 UTC
Finally fixed by changeset:   270297:a95fa5b42f5f
http://hg.netbeans.org/core-main/rev/a95fa5b42f5f
Comment 5 Jaroslav Tulach 2014-01-10 08:47:52 UTC
I can confirm the program counter is displayed correctly now. However there is a problem with breakpoints. Once you place a breakpoint into <eval.js> snippet, it becomes active in all snippets...

Reported as bug 240183
Comment 6 Quality Engineering 2014-01-11 04:45:54 UTC
Integrated into 'main-silver', will be available in build *201401110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a95fa5b42f5f
User: mentlicher@netbeans.org
Log: #239382: Cache the source objects not by class names, but by class unique IDs.