Eclipse 无法识别断点

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10035242/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:58:24  来源:igfitidea点击:

Eclipse not recognizing breakpoints

eclipsedebugging

提问by sdfwer

I am having this weird bug in eclipse when setting my breakpoints it just over lap it without passing through the breakpoint where the method is called. I know it keeps bypassing it for the reason that the only method that is being called is on a lot of breakpoints.

我在 eclipse 中遇到了这个奇怪的错误,当设置我的断点时,它只是重叠它而不通过调用方法的断点。我知道它一直绕过它,因为唯一被调用的方法是在很多断点上。

Did anyone encounter this kind of problem or know a fix?

有没有人遇到过这种问题或知道修复方法?

采纳答案by sdfwer

Restarted eclipse and this time I was able to debug properly. Strange bug I am uncertain of knowing the cause and effect.

重新启动 eclipse,这次我能够正确调试。奇怪的错误我不确定原因和结果。

回答by Deepak Azad

Make sure that 'Run > Skip all breakpoints' is not enabled.

确保未启用“运行 > 跳过所有断点”。

回答by Olivier Refalo

there can be many many reasons:

可能有很多很多原因:

The most common ones:

最常见的:

  • .java and .class are out of sync
  • wrong version of the runtime JVM
  • debug information removed from the generated class
  • classpath mismatch, for instance eclipse compiles into bin/ and your runtime picks up classes from classes/ (this assumes, you also compile from the command line)
  • Bad Eclipse installation
  • .java 和 .class 不同步
  • 运行时 JVM 的错误版本
  • 从生成的类中删除调试信息
  • 类路径不匹配,例如 eclipse 编译到 bin/ 并且您的运行时从 classes/ 中选取类(假设您也从命令行编译)
  • Eclipse 安装错误

First try cleaning the project by using the clean function

首先尝试使用clean函数清理项目

Project > clean...

项目 > 清洁...

回答by JAveedMeandad

Please check if you have any beans declared in xml file. If so please check if they are commented we need to uncomment them.

请检查您是否在 xml 文件中声明了任何 bean。如果是这样,请检查它们是否被评论,我们需要取消评论它们。

In my case i have a bean declaration in my xml file for that particular bean and it is not loaded at the time of server start. So my debug points are not enabled.

在我的情况下,我的 xml 文件中有一个 bean 声明,用于该特定 bean,它在服务器启动时未加载。所以我的调试点没有启用。

I have uncommented my bean entry then i am able to check debug points and it is working.

我取消了我的 bean 条目的注释,然后我可以检查调试点并且它正在工作。

hope it will help.

希望它会有所帮助。