milanka created NETBEANS-3712:
---------------------------------

             Summary: Can's submit line breakpoint if another class with same 
name and package exists
                 Key: NETBEANS-3712
                 URL: https://issues.apache.org/jira/browse/NETBEANS-3712
             Project: NetBeans
          Issue Type: Bug
          Components: debugger - Java
         Environment: Product Version: Apache NetBeans IDE 11.2
Java: 13.0.1; OpenJDK 64-Bit Server VM 13.0.1+9
Runtime: OpenJDK Runtime Environment 13.0.1+9
System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
            Reporter: milanka


There are two Maven projects and both have a class with the same name in the 
same package (which might be a bit unusual, I admit). Both projects are open in 
Netbeans. After adding (line) breakpoint and attaching the debugger, there is 
an error in "Output - Debugger Console":
{code:java}
Not able to submit breakpoint LineBreakpoint Main.java : 7, reason: 
Breakpoint's source file does not belong into the preferred source root 
'C:\path\to\other\project\src\main\java'.
See Window/Debugging/Sources and assure that the intended source roots are 
selected for debugging.
Invalid LineBreakpoint Main.java : 7
{code}
Example class:
{code:java}
package my.package;

public class Main {

    public static int foo() {
        int i = 3;
        i++;
        return i;
    }
}

{code}
This works after the other project is closed in Netbeans or the class is moved 
to a different package.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to