简体   繁体   English

当断点位于父类中时,Eclipse调试器无法找到源

[英]Eclipse debugger cannot find source when breakpoint is in parent class

When my breakpoint is set in an ancestor class, the Eclipse debugger stops at the correct breakpoint, but displays the "Source not found" error. 当在祖先类中设置断点时,Eclipse调试器将在正确的断点处停止,但显示“找不到源”错误。 The title of the window, instead of showing the class name like normal, has the full ConcreteClass(ParentClass) name, including the parentheses. 窗口标题具有完整的ConcreteClass(ParentClass)名称(包括括号),而不是像通常那样显示类名称。 This is the same string that shows in the debug window containing the executing stack. 这与包含正在执行的堆栈的调试窗口中显示的字符串相同。

So, no wonder it can't find that class. 因此,难怪它找不到该类。 But why is it doing that? 但是为什么要这样做呢?

For instance, in the source tab, the title it says it is looking for says: TransferOfFundsAction(DocumentActionBase) 例如,在“源”选项卡中,它正在寻找的标题说:TransferOfFundsAction(DocumentActionBase)

where DocumentActionBase is the class with the breakpoint, and TransferOfFundsAction is the child class being executed. 其中DocumentActionBase是带有断点的类,而TransferOfFundsAction是要执行的子类。

我在Eclipse 4.4.1中遇到了相同的问题,可以通过在“调试配置”中定义“项目”并将其设置为定义了所需的源或库引用的当前项目,来解决该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM