Eclipse stops at non-existent breakpoint
I have an Eclipse (java) project which stops at non-existent breakpoints. There was a breakpoint at this location at one time, but I rem开发者_如何学Pythonoved it. Any ideas why this would be happening?
Note: It is not the same issue mentioned here - phantom breakpoint driving me crazy!
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.
If you are sure that there aren't breakpoints (Run > Remove All Breakpoints), then there are 2 things to consider:
- You are misunderstanding something of how the debugger works.
- Your program is stopped because it's waiting for some input.
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
I had same issue, I am using eclipse Mars. In my case I fixed it differently. Steps:
I opened breakpoint tab (you will see this if you are in debug perspective)
I saw there were two breakpoints enabled for the same line of code one of them was already unchecked but another was checked
I unchecked it and now it does not stop anymore.
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.
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:
- "Windows -> Preferences -> PHP (or Java in this case) -> Debug" and uncheck "Break at first line".
- "Run > Debug Configurations > PHP Web Application (or Java in this case)" and unselect "Break at first line" in all the configurations
- "Project > Properties > PHP > Debug", unselect "Break at First Line"
精彩评论