简体   繁体   English

无法在eclipse“找不到源”中调试任何东西

[英]Can't debug anything in eclipse “Source not found”

I can't debug anything since yesterday and I don't know what it is. 自昨天以来,我无法调试任何东西,我也不知道它是什么。 My programs run fine, and there is no error whatsoever. 我的程序运行正常,没有任何错误。 It doesn't matter which program i debug, I can make a Hello World-program and the debugger wont start. 我调试哪个程序都没有关系,我可以制作一个Hello World程序,调试器将不会启动。 This is what I get: 这是我得到的:

Source not found, confirm perspective switch 找不到源,请确认透视开关

找不到源,请确认透视开关

If I click yes; 如果我单击是; Debugger info 调试器信息

如果我单击是;调试器信息

If I click No, nothing happens. 如果单击“否”,则什么都不会发生。

I've tried configuring the debugger by adding all my projects to "Source", but that doesn't do it. 我已经尝试通过将所有项目添加到“源”来配置调试器,但是并没有这样做。 :/ I've searched the web for more solutions but nothing works for me. :/我已经在网上搜索了更多解决方案,但没有任何结果适合我。

If you don't have the source jar to the code you're trying to step into, then you can't see the code, because it's the executable version. 如果您没有要尝试插入的代码的源jar,则看不到该代码,因为它是可执行版本。

Meaning, for an example, if you're trying to debug the code in json.jar file, then you should have something like json-source.jar that you can attach to that file so you can step into it and see what's happening. 举例来说,这意味着,如果您要调试json.jar文件中的代码,则应该将json-source.jar之类的内容附加到该文件上,以便您可以进入其中并查看发生了什么。 If you can elaborate more on your situation, we might be able to help more. 如果您可以详细说明您的情况,我们可能会提供更多帮助。

OK I Solved it! 好,我解决了! Newbie alert! 新手警报!

I had TOO MANY debug sessions going on, and didn't know I had to terminate them. 我正在进行太多调试会话,但不知道我必须终止它们。 So while I clicked "Step into" I thought nothing happened, but I actually slowly ate the exceptions that was there. 因此,当我单击“进入”时,我以为没有任何反应,但是实际上我慢慢地吃了那里的异常。 I also had an exception ticked, which means the debugger started from there and didn't go directly to my breakpoints. 我还勾选了一个异常,这意味着调试器从那里开始,并且没有直接进入我的断点。

WHY that exception is there I have no idea, since the code runs fine from the JFrame... 为什么不知道异常,因为代码从JFrame可以正常运行...

I terminated the debug sessions to the left, so now it's clean and fresh. 我终止了左侧的调试会话,所以现在它很干净。 And after unchecking the exception bs and only checking my breakpoints, it works: 取消选中异常bs并仅检查我的断点后,它可以工作:

Screenshot 屏幕截图

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

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