有时我无法在Eclipse中设置断点,如何在不重新打开文件的情况下解决它?
有时,在调试会话期间,在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如 bug 125768 和 错误 322625,当打开的源文件不是项目引用的文件(带有 IResource 的内部文件)而是外部文件(如反编译器即时创建的文件)时,已定义的断点可能会消失
。
在这种情况下,您会看到类似以下内容的内容:
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: