Eclipse stops at non-existent breakpoint

2019-04-18 18:39发布

问题:

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!

回答1:

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.


回答2:

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.



回答3:

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.



回答4:

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



回答5:

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"