有时我无法在Eclipse中设置断点,如何在不重新打开文件的情况下解决它?

发布于 2024-12-12 20:50:27 字数 386 浏览 1 评论 0原文

有时,在调试会话期间,在 Eclipse 中设置断点的功能似乎会失效。从那时起,双击边距不再显示蓝色球,右键单击并明确要求“切换断点”也不再显示蓝色球。所有线路都会发生这种情况。

  • 这种情况很少发生,但我已经记得很多次它发生在我身上,在不同的机器、不同的操作系统和不同的 Eclipse 版本(3.6/3.7,也许还有 3.5)上
  • 保存并刷新文件。
  • 这是经典 Eclipse 中的 Java 项目。
  • 该行是断点的有效行 - 事实上,一旦发生这种情况,没有行可以获得断点。
  • 关闭并重新打开该文件,或重新启动 Eclipse,似乎可以解决该问题。

由于最后一个项目符号,我很确定这是某种错误。我怎样才能避免这种行为?

Sometimes, during a debugging session, the ability to set breakpoints in Eclipse seems to break. From that moment onwards, double-clicking the margin no longer shows a blue ball, and neither does right clicking and explicitly asking to "toggle break point". This happens for all the lines.

  • This happens rarely, but I already remember quite a few times it happened to me, on different machines, different operating systems and different Eclipse versions (3.6/3.7, maybe also 3.5)
  • The file is saved and refreshed.
  • This is a Java project in classic Eclipse.
  • The line is a valid line for a breakpoint - in fact, once this happens, no line can get a breakpoint.
  • Closing and re-opening the file, or restarting Eclipse, seems to solve the issue.

Because of the last bullet I'm pretty sure this is a bug of some sort. How can I avoid this behavior?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

梦里的微风 2024-12-19 20:50:27

bug 125768错误 322625,当打开的源文件不是项目引用的文件(带有 IResource 的内部文件)而是外部文件(如反编译器即时创建的文件)时,已定义的断点可能会消失

在这种情况下,您会看到类似以下内容的内容:

源中不再有断点

该文件是 JAR 中已编译类的源代码(即
只读,不可编辑)。

IDE 似乎并不总是将其视为“位于
classpath”。其他编辑器有带有二进制底层的“J”图标。

我刚刚检查过:如果我得到空心“J”,则断点不可见。

As illustrated by bug 125768 and bug 322625, the already-defined breakpoints can disappear when the source file opened is not the one referenced by your project (internal file with an IResource), but an external one (like one created on the fly by a decompiler)
.

In that case, you see something similar to:

no more breakpoint in the source

The file is the source for a compiled class that's in a JAR (i.e.
read-only, non-editable).

It seems that the IDE doesn't always pick that up as a "Java file that's on the
classpath". Other editors have the "J" icon with the binary underlay.

I just checked: If I get the hollow "J", then breakpoints aren't visible.

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