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 184612 - Breakpoint hit, F8 does not stop on next line
Summary: Breakpoint hit, F8 does not stop on next line
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: Other Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 181305 (view as bug list)
Depends on: 188039
Blocks:
  Show dependency tree
 
Reported: 2010-04-21 13:28 UTC by Jaroslav Tulach
Modified: 2010-07-16 07:46 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2010-04-21 13:28:44 UTC
I have troubles debugging libraries without associated sources. I know how to workaround the problem, but the behavior is so clumsy that it deserves a bug report, imho.

Setup:
1. take any project that uses an external library (just a JAR without sources)
2. checkout sources of the library (in my case a maven project, but it does not matter)
3. put a breakpoint into some source in the library
4. debug your project

The breakpoint in the library works and the execution stops there (good). The file is open in editor and program counter is highlighted (good).

Now press F8. One would expect the execution stops on the next line following the breakpoint but it does not! It goes on.

Workaround: Whenever I notice this (mis)behavior I locate the root of the sources, and add it into the debugging/sources window. However this UI gestures for doing so are really poor and long. Not talking about newcomers that are unlikely to find them at all.

Wish: Whenever a breakpoint is hit, make sure (automatically or via user hint) its source root is added (temporarily?) into the sources list.
Comment 1 Tomas Pavek 2010-04-22 08:38:44 UTC
If debugger opens the file and the current line is highlighted after stopping on breakpoint, then Step Over should just continue working with that file. Similar to bug 181305.
Comment 2 Ondrej Langr 2010-04-22 15:15:11 UTC
Agree that expected behavior is to continue on the next line. 

Jarda, why do you actually need to add the library into sourceroot in such case? Is it just a workaround to be able to debug such file or do you need it for the future too .. ?
Comment 3 Jaroslav Tulach 2010-04-23 09:53:33 UTC
As a user I don't care about source roots, I just want to debug the library I have breakpoint in. The "debug" here however means various combinations of F8, F7, F4 in the class with the breakpoint as well as in other classes in the same library.
Comment 4 Daniel Prusa 2010-04-27 10:14:24 UTC
*** Bug 181305 has been marked as a duplicate of this bug. ***
Comment 5 Martin Entlicher 2010-06-11 11:42:04 UTC
Fixed in changeset:   172881:f98a44c11fbe
http://hg.netbeans.org/main/rev/f98a44c11fbe
http://hg.netbeans.org/main/rev/7a22c3f235f5

When you try to step into an unknown source, it's source root is automatically added into the Sources tab. This resolves this problem.
Comment 6 Quality Engineering 2010-06-12 06:49:52 UTC
Integrated into 'main-golden', will be available in build *201006120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f98a44c11fbe
User: mentlicher@netbeans.org
Log: #184612 - Automatically add a source root when stepping into unknown sources.
Comment 7 rbalada 2010-06-16 08:53:13 UTC
Please verify bugfix for this bug, so it can be included in release691 repository.

Thanks,
-R
Comment 8 Petr Blaha 2010-06-17 11:51:36 UTC
verified
Comment 9 rbalada 2010-06-21 12:53:24 UTC
main #f98a44c11fbe transplanted to release691 #4e7160d3f63f
main #7a22c3f235f5 transplanted to release691 #4892bd5c3b4b
Comment 10 Marian Mirilovic 2010-07-09 06:52:50 UTC
verified in NetBeans IDE 6.9.1 Dev (Build 201007082301)