18

I have an Eclipse (java) project which stops at non-existent breakpoints. There was a breakpoint at this location at one time, but I removed it. Any ideas why this would be happening?

Note: It is not the same issue mentioned here - phantom breakpoint driving me crazy!

Community
  • 1
  • 1
Geoff
  • 183
  • 1
  • 1
  • 4

6 Answers6

41

I have suffered this. To fix it, just goto Run->Remove All Breakpoints in the menu. It will remove it. Later you can redefine your required breakpoints again.

Suraj Chandran
  • 24,433
  • 12
  • 63
  • 94
  • @Geoff, feel free to upvote the answer and mark it as accepted, it will help others with same problem. – Suraj Chandran Aug 24 '11 at 15:42
  • 1
    Great that this answer helps a lot but I can't see it as the accepted answer since the title says "non-existent breakpoint". If no breakpoint exists the option "remove all breakpoints" is inactive. – katana0815 Feb 02 '18 at 13:50
  • Thanks, I've been looking for this solution for a while! – Ruik Dec 09 '20 at 11:27
12

If you are sure that there aren't breakpoints (Run > Remove All Breakpoints), then there are 2 things to consider:

  1. You are misunderstanding something of how the debugger works.
  2. Your program is stopped because it's waiting for some input.
Pang
  • 9,564
  • 146
  • 81
  • 122
Heisenbug
  • 38,762
  • 28
  • 132
  • 190
6

Eclipse possibly stops because of an uncaught exception. To fix this:

  • handle the exception
  • Preferences -> Java -> Debug > Suspend execution on uncaught exceptions (in this menu there are more settings to suspend execution!)

I got this information from: https://stackoverflow.com/a/723313/944440

katana0815
  • 398
  • 7
  • 17
  • Finally. I had this configured by accident or something at some point, and I was totally unable to find the setting to disable it! I knew it was stoping on exceptions by default, but could not find why. Thanks. – DGoiko Nov 27 '19 at 21:39
2

I had same issue, I am using eclipse Mars. In my case I fixed it differently. Steps:

  1. I opened breakpoint tab (you will see this if you are in debug perspective)

  2. I saw there were two breakpoints enabled for the same line of code one of them was already unchecked but another was checked

  3. I unchecked it and now it does not stop anymore.

Nikolay Mihaylov
  • 3,868
  • 8
  • 27
  • 32
  • Great solution, instead of 'delete all and create again...', because in a huge JAVA-project you have several Breakpoints in different files, you cannot recreate all Breakpoints you have set in a session without losing orientation.. Thanks Roshan! – Banzai Jul 05 '18 at 13:51
1

The problem is that eclipse stops in your "removed" break-point in an other thread. So if you have, for example 10 threads, and the debugger is stopped in a breakpoint that you have placed then ,even if you remove the breakpoint , the debugger will stop at the place where the breakpoint used to be in the rest 9 threads

If you choose to stop the entire VM when a breakpoint is hit, then other threads will not reach that breakpoint (since they are suspended) and you will not get this strange behavior

In order to change Suspend scope, right click on the breakpoint ==> properties => select relevant radio option

Suspend thread/VM : These are radio buttons. By default debugger will only suspend the thread in which breakpoint is hit. However, if you select the radio box Suspend VM, then all threads will be suspended when breakpoint is hit.

Maayan Hope
  • 1,482
  • 17
  • 32
0

If it happens on the first line, then it should be a Debugger setting. This thread should help: Prevent xdebug to break at first line of index file

But in short:

  1. "Windows -> Preferences -> PHP (or Java in this case) -> Debug" and uncheck "Break at first line".
  2. "Run > Debug Configurations > PHP Web Application (or Java in this case)" and unselect "Break at first line" in all the configurations
  3. "Project > Properties > PHP > Debug", unselect "Break at First Line"
Community
  • 1
  • 1
zeta
  • 1,517
  • 1
  • 20
  • 14