Eclipse 在不存在的断点处停止

发布于 2024-12-01 05:28:12 字数 206 浏览 0 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

﹎☆浅夏丿初晴 2024-12-08 05:28:12

我就受过这样的苦。要修复它,只需转到菜单中的运行->删除所有断点即可。它将删除它。
稍后您可以再次重新定义所需的断点。

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.

梦幻的味道 2024-12-08 05:28:12

如果您确定没有断点(“运行”>“删除所有断点”),则需要考虑两件事:

  1. 您误解了调试器的工作方式。
  2. 您的程序已停止,因为它正在等待某些输入。

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.
A君 2024-12-08 05:28:12

Eclipse 可能因未捕获的异常而停止。要解决此问题:

  • 处理异常
  • Preferences -> Java->调试>未捕获异常时暂停执行(在此菜单中,有更多暂停执行的设置!)

我从以下位置获得此信息:
https://stackoverflow.com/a/723313/944440

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

孤独患者 2024-12-08 05:28:12

我有同样的问题,我正在使用 eclipse Mars。就我而言,我以不同的方式修复了它。
步骤:

  1. 我打开了断点选项卡(如果您处于调试视角,您将看到这个)

  2. 我看到有两个断点为同一行代码启用了其中一个已取消选中,但另一个已选中

  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.

铁轨上的流浪者 2024-12-08 05:28:12

问题是 Eclipse 在另一个线程中的“已删除”断点处停止。
因此,如果您有,例如 10 个线程,并且调试器在您放置的断点处停止,即使您删除断点,调试器也会停止在其余 9 个线程中断点曾经所在的位置

如果您选择在遇到断点时停止整个虚拟机,那么其他线程将不会到达该断点(因为它们被挂起),并且您不会得到这种奇怪的行为

为了更改挂起范围,请右键单击断点==>特性
=>选择相关的单选选项

挂起线程/VM:这些是单选按钮。默认情况下调试器会
只挂起断点所在的线程。但是,如果您
选择Suspend VM单选框,则所有线程将被挂起
当断点被击中时。

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.

内心激荡 2024-12-08 05:28:12

如果它发生在第一行,那么它应该是调试器设置。此线程应该有所帮助: 防止 xdebug 在第一行中断索引文件

但简而言之:

  1. “Windows -> 首选项 -> PHP(在本例中为 Java)-> 调试”并取消选中“在第一行中断”。
  2. “运行 > 调试配置 > PHP Web 应用程序(本例中为 Java)”,并在所有配置
  3. “项目 > 属性 > PHP > 调试”中取消选择“在第一行中断”,取消选择“在第一行中断” ”

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"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文