Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Breakpoint doesn't break
Breakpoint doesn't break [message #255198] Thu, 01 May 2008 15:42 Go to next message
Jonathan Camilleri is currently offline Jonathan CamilleriFriend
Messages: 91
Registered: July 2009
Member
I've set a breakpoint next to an if statement but the code runs without
breaking.
Any idea why?

public class ManagerTest
{
public static void main(String[] args)
{
// construct a Manager object
Manager boss = new Manager("Harry Hacker", 50000, 1989, 10, 1);
boss.setBonus(5000);

Employee[] staff = new Employee[3];

// fill the staff array with Manager and Employee objects

staff[0] = boss;
staff[1] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
staff[2] = new Employee("Tommy Tester", 40000, 1990, 3, 15);

if ((staff[0] instanceof Manager)
&& staff[0].equals(staff[1])) { //***BREAKPOINT HERE***
System.out.println("true");
}
}}
Re: Breakpoint doesn't break [message #255206 is a reply to message #255198] Thu, 01 May 2008 16:04 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Jon wrote:
> I've set a breakpoint next to an if statement but the code runs without
> breaking.
> Any idea why?

If you already know that, you'll call me an idiot, but, do you actually run the
program through the debugger? (Don't klick the "Run" arrow, but the "Bug" left
to it)
Re: Breakpoint doesn't break [message #255209 is a reply to message #255198] Thu, 01 May 2008 16:07 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Jon,

I just read your previous post. You can learn a lot by watching Marks video
tutorials, about programming java and also the eclipse debugger. Just have a
break and enjoy.

eclipsetutorial.sourceforge.net
Previous Topic:java.lang.NoSuchMethodError:main
Next Topic:.cproject and CVS
Goto Forum:
  


Current Time: Wed Feb 05 14:10:15 GMT 2025

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

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

Back to the top