Eclipse 在不存在的断点处停止
我有一个 Eclipse (java) 项目,它在不存在的断点处停止。这个位置曾经有一个断点,但我把它删除了。有什么想法为什么会发生这种情况吗?
注意:这与此处提到的问题不同 - 幻象断点让我发疯!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我就受过这样的苦。要修复它,只需转到菜单中的运行->删除所有断点即可。它将删除它。
稍后您可以再次重新定义所需的断点。
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:
Eclipse 可能因未捕获的异常而停止。要解决此问题:
我从以下位置获得此信息:
https://stackoverflow.com/a/723313/944440
Eclipse possibly stops because of an uncaught exception. To fix this:
I got this information from:
https://stackoverflow.com/a/723313/944440
我有同样的问题,我正在使用 eclipse Mars。就我而言,我以不同的方式修复了它。
步骤:
我打开了断点选项卡(如果您处于调试视角,您将看到这个)
我看到有两个断点为同一行代码启用了其中一个已取消选中,但另一个已选中
我取消选中它现在没有了不再停止。
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.
问题是 Eclipse 在另一个线程中的“已删除”断点处停止。
因此,如果您有,例如 10 个线程,并且调试器在您放置的断点处停止,即使您删除断点,调试器也会停止在其余 9 个线程中断点曾经所在的位置
如果您选择在遇到断点时停止整个虚拟机,那么其他线程将不会到达该断点(因为它们被挂起),并且您不会得到这种奇怪的行为
为了更改挂起范围,请右键单击断点==>特性
=>选择相关的单选选项
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
如果它发生在第一行,那么它应该是调试器设置。此线程应该有所帮助: 防止 xdebug 在第一行中断索引文件
但简而言之:
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: