Skip to main content



      Home
Home » Newcomers » Newcomers » Breakpoint doesn't break
Breakpoint doesn't break [message #255198] Thu, 01 May 2008 11:42 Go to next message
Eclipse UserFriend
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 12:04 Go to previous messageGo to next message
Eclipse UserFriend
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 12:07 Go to previous message
Eclipse UserFriend
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: Sun Jun 08 20:45:56 EDT 2025

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

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

Back to the top