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 50590 - Debugger doesn't stop at breakpoint
Summary: Debugger doesn't stop at breakpoint
Status: CLOSED DUPLICATE of bug 50591
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 09:04 UTC by Jiri Skrivanek
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 Jiri Skrivanek 2004-10-19 09:04:26 UTC
From build 20041018-1530 debugger doesn't stop at
any breakpoint. It starts and finishes after user
program is finished.

Build 20041018-1530, JDK1.5.0, WindowsXP.
Comment 1 Jan Jancura 2004-10-19 10:02:58 UTC
I can reproduce this problem in main method only.

Like:
public class Main {
    public static void main(String[] args) {
        System.out.println("sdgadfgad"); // breakpoint here
        System.out.println("dfgdsfhrshen");
    }
    
}

If I put breakpoint to some other place it works!
public class Main {
    public Main() {
        System.out.println("dfgsdhhgfgh"); // breakpoint here
    }
    public static void main(String[] args) {
        new Main ();
    }
    
}

Confirm, please...
Comment 2 Jiri Skrivanek 2004-10-19 10:12:32 UTC
Yes, it is true. I forgot to mention that it breaks the commit
validation suite. That's why I signed it as P1.
Comment 3 Jan Jancura 2004-10-19 10:13:05 UTC
Looks like problem is caused by src hierarchy.

This piece of code:

        DataObject dataObject = getDataObject (url);
        if (dataObject == null) return null;
        SourceCookie.Editor sc = (SourceCookie.Editor)
dataObject.getCookie 
            (SourceCookie.Editor.class);
        if (sc == null) return null;
        StyledDocument sd = null;
        try {
            sd = sc.openDocument ();
        } catch (IOException ex) {
        }
        if (sd == null) return null;
        int offset = NbDocument.findLineOffset (sd, lineNumber);
        Element element = sc.findElement (offset);

returns SourceElement in place of MethodElement!
Comment 4 Martin Matula 2004-10-19 14:42:36 UTC
Fixed.

*** This issue has been marked as a duplicate of 50591 ***
Comment 5 Jiri Skrivanek 2004-10-20 10:31:11 UTC
Verified.
Comment 6 Quality Engineering 2007-09-20 09:47:09 UTC
Reorganization of java component