Debugging - Wrong breakpoint hit - bug or feature? [message #181876] |
Mon, 19 January 2004 00:05  |
Eclipse User |
|
|
|
Originally posted by: kachung_ho.yahoo.com
Hi,
Recently when I was debugging two programs, I found a strange behaviour in
Eclipse.
I am using Eclipse M6, but I think M5 has the same problem. Not sure about
earlier versions.
Steps:
1) Create a java project "JavaHelloWorld"
2) Add a java class "HelloWorld"
3) Add this:
public static void main(String[] args) {
int a = 0;
int b = 1;
System.out.println(a);
System.out.println(b);
}
4) Copy project "JavaHelloWorld"
5) Paste into the same workspace - change name to "JavaHelloWorld2"
6) Now you've got two projects, and inside them you've got exactly two
same classes.
7) Open these two HelloWorld sources.
8) Add a breakpoint on "System.out.println(a)" inside first HelloWorld
9) Add another breakpoint on "System.out.println(b)" inside second
HelloWorld
10) Debug the first HelloWorld
11) The breakpoint is hit on "System.out.println(a)"
12) Resume the thread
I thought that the program will keep running to the end but it's not. The
thread will suppend on the same line of where the other breakpoint is set
(which is set on the second HelloWorld).
Does anyone know if this is a bug?
Thanks,
Tim
|
|
|
Re: Debugging - Wrong breakpoint hit - bug or feature? [message #181988 is a reply to message #181876] |
Mon, 19 January 2004 09:23  |
Eclipse User |
|
|
|
This is a known problem. Breakpoints are based on fully qualfied type names,
and do distinguish by project (i.e. the same fully qualified type name in
different projects will make this happen).
https://bugs.eclipse.org/bugs/show_bug.cgi?id=22536
Darin
"Tim" <kachung_ho@yahoo.com> wrote in message
news:bufojn$emq$1@eclipse.org...
> Hi,
>
> Recently when I was debugging two programs, I found a strange behaviour in
> Eclipse.
>
> I am using Eclipse M6, but I think M5 has the same problem. Not sure about
> earlier versions.
>
> Steps:
> 1) Create a java project "JavaHelloWorld"
> 2) Add a java class "HelloWorld"
> 3) Add this:
>
> public static void main(String[] args) {
> int a = 0;
> int b = 1;
> System.out.println(a);
> System.out.println(b);
> }
>
> 4) Copy project "JavaHelloWorld"
> 5) Paste into the same workspace - change name to "JavaHelloWorld2"
> 6) Now you've got two projects, and inside them you've got exactly two
> same classes.
> 7) Open these two HelloWorld sources.
> 8) Add a breakpoint on "System.out.println(a)" inside first HelloWorld
> 9) Add another breakpoint on "System.out.println(b)" inside second
> HelloWorld
> 10) Debug the first HelloWorld
> 11) The breakpoint is hit on "System.out.println(a)"
> 12) Resume the thread
>
> I thought that the program will keep running to the end but it's not. The
> thread will suppend on the same line of where the other breakpoint is set
> (which is set on the second HelloWorld).
>
> Does anyone know if this is a bug?
>
> Thanks,
> Tim
>
|
|
|
Powered by
FUDForum. Page generated in 0.04579 seconds