Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Debugging - Wrong breakpoint hit - bug or feature?
Debugging - Wrong breakpoint hit - bug or feature? [message #181876] Mon, 19 January 2004 00:05 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Repost: Language Pack Inconsistency?
Next Topic:Cell Editor not showing for Scrollable table
Goto Forum:
  


Current Time: Sat Jul 19 05:32:40 EDT 2025

Powered by FUDForum. Page generated in 0.04579 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top