Bug 196411 - "Breakpoint's source file does not belong into the preferred source root" when I have the project open
"Breakpoint's source file does not belong into the preferred source root" whe...
Status: NEW
Product: debugger
Classification: Unclassified
Component: Java
7.0
PC Linux
: P3 with 4 votes (vote)
: 7.2
Assigned To: Martin Entlicher
issues@debugger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-07 19:12 UTC by quidryan
Modified: 2013-02-01 19:23 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description quidryan 2011-03-07 19:12:51 UTC
I'm debugging from a maven project, and found that I need another project opened, Project2, so I opened it. I tried adding a debug point but got the error "Breakpoint's source file does not belong into the preferred source root". I looked at Windows->Debugging->Sources and I see the Project2-sources.jar from the maven repository, but not for Project2 that I just opened from a checkout subversion directory.

I disconnected from the debugging session, then close, then open Project2. It then works. It looks like Opening a project is not updating a live debugging session.
Comment 1 savan 2011-10-27 13:53:19 UTC
This also happened to me.  When it happened to me I was debugging and I had two classes in my workspace, same name, same package, but different projects.

Workaround
The breakpoint I was trying to add was in the file listed 2nd in debugging sources.  I moved the project containing the file to which I wanted to add the breakpoint to the top of the list and it worked.
Comment 2 jeffery.yuan 2011-11-30 08:30:06 UTC
Meet same problem today in Netbeans 7.1RC1, and followed savan's workaround, and it worked.
But I think this should be resolved if possible in future release.
Comment 3 WalterGdot 2011-12-16 10:35:31 UTC
Same problem when debugging: Breakpoints were not reachable.
in my situation problem occured this way:
1.)i checked out a Project via subversion and created a Netbeans Project with Existing Sources
2.)created a totally new Project in NetBeans
   - wrong Classpath, when rightclicked on one of the classes where the breakpoints were not reachable, were shown
   - the Classpath of the last checked out project were shown (not the one of the actual project)
3.)rightclicked the Netbeans Project and in Properties/Libraries removed the wrong entry in the "Compile-time" Libraries
4.)debuger worked as usual
Comment 4 bht 2013-02-01 19:23:03 UTC
Could this perhaps be fixed by adding project sources of a new project at the top of the list of breakpoints gaining top priority? Not knowing what the problem is, I would intuitively try to close and re-open the failing project. Moving multiple source packages all the way up from the bottom as suggested as workaround is hard to do at times.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo