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 202373 - Debugger does not stop on breakpoints during remote debugging
Summary: Debugger does not stop on breakpoints during remote debugging
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.1
Hardware: Macintosh (x86) Mac OS X
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 17:31 UTC by michal.owsiak
Modified: 2011-09-27 14:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
remote debugger (2.19 MB, video/quicktime)
2011-09-20 17:36 UTC, michal.owsiak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michal.owsiak 2011-09-20 17:31:59 UTC
There are two main issues:

1. Remote debugger doesn't start application within Debug mode when Glasfish 3.x is configured as remote server

2. When Debugger is attached to remote server it doesn't stop on the breakpoints

see the movie
Comment 1 michal.owsiak 2011-09-20 17:36:30 UTC
Created attachment 110929 [details]
remote debugger

I can provide better quality movie if needed.
Comment 2 Martin Entlicher 2011-09-21 06:50:03 UTC
It looks like JSP debugger is not activated on attach. It starts only Java debugger, therefore it does not submit the JSP breakpoints. I do not think this has ever worked.
I'll check what I can do about this...
Comment 3 Martin Entlicher 2011-09-22 13:25:04 UTC
After detailed inspection of what's going on, I've found out that this is not a problem of not activated JSP debugger.
Do you have opened other projects that have index.jsp files? This is how I've reproduced the problematic behavior.

We have checks to verify whether the file with the breakpoint is the first of it's name on the class path. This indicates us whether the breakpoint should be active, because when there is some other file with the same name sooner on the class path, that will be loaded instead. This logic works fine when the debugger is started on a project, the class path concerns the given project only.
But on attach, debugger's class path consists of all opened projects. If there's some (unrelated) project containing index.jps opened before the project containing the breakpoint, the breakpoint will not be active.

First, JSP breakpoints should inherit the validation mechanism of Java breakpoints. The validation would indicate if the breakpoint is active or not.
Then, the description from the validation will guide the user to adjust the debugger's source roots so that it's clear which projects are intended to be used and which not.
Comment 4 Martin Entlicher 2011-09-26 09:30:14 UTC
I have implemented validation of JSP breakpoints in changeset:   202894:14629bf2aa5b
http://hg.netbeans.org/main/rev/14629bf2aa5b
After this, the breakpoint will be marked as invalid and in Debugger Console as well as in breakpoint's tooltip you'll see the reason why it's invalid.

In this case, most probably this was caused by another project with a file of the same name and package. The resolution is to uncheck the source roots in Sources window, that are not relevant for the project that is deployed on the server.
Comment 5 Quality Engineering 2011-09-27 14:13:30 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/14629bf2aa5b
User: mentlicher@netbeans.org
Log: #202373 Validation of JSP breakpoints implemented.