Java调试:找不到源 [英] Java Debugging: Source not found
问题描述
图片有点难但是,而不是获得正常的调试窗口,而是说它正在抛出一个ClassNotFoundException,并试图破坏Launcher $ ExtClassLoader的源。
真的让我失望的是,我可以运行的代码很好,只有当我点击调试按钮我有问题。
我也试过调试命令行与JDB,我得到相同的错误。
到目前为止,我已经尝试重新安装Eclipse并下载(我认为是)正确的Java开发工具对于Mac OS X。
我不知道还有什么我可以尝试,所以任何帮助将不胜感激。如果有任何其他信息可以提供,请告诉我。
源动态加载代码可能是合法的(例如Maven)。
我知道有三种解决方法(经过几个月的搜索):
-
使用调试器连接到正在运行的JVM,您将看到代码。
-
从此处使用Eclipse的动态源代码查找插件:
https:// github。 com / ifedorenko / com.ifedorenko.m2e.sourcelookup
-
使用run-jetty-run Maven插件
我喜欢和推荐3.它工作和启动webapp比码头快得多:运行。
不幸2.没有帮助我,因为它有问题Windows空间的路径。
我已经在Eclipse Bugzilla上填写了一个增强请求,如果你同意这个问题Source not found应该永远消失,请在此投票:
https:// bugs.eclipse.org/bugs/show_bug.cgi?id=384065
I am having a problem with Eclipse where I can run my program just fine, but when I try to start the debugger, I get this message
The picture is a little hard to make out, but instead of getting the normal debugging window, instead it says it is throwing a ClassNotFoundException, and is trying to dislay the source for Launcher$ExtClassLoader.
The thing that really baffles me though is that I can run the code just fine, it is only when I click the debug button that I have the problem.
I have also tried debugging at the command line with JDB, and I got the same error.
So far, I have tried Reinstalling Eclipse and downloading (what I believe to be) the correct Java Development tools for Mac OS X.
I have no idea what else I can try, so any help would be greatly appreciated. Let me know if there is any other information I can provide.
Source not found might be legitimate for dynamically loaded code (e.g. Maven).
There are three workarounds known to me (after months of search):
Connect to a running JVM with the debugger and you will see the code.
Use Dynamic Source Lookup plugin for Eclipse from here:
https://github.com/ifedorenko/com.ifedorenko.m2e.sourcelookup
Use run-jetty-run Maven plugin
I prefer and recommend 3. It works and starts webapp much faster than jetty:run.
Unfortunately 2. didn't helped me as it has issues with Windows paths with spaces.
I have filled an enhancement request on Eclipse Bugzilla and if you agree this issue "Source not found" should vanish forever, please vote for it here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=384065
这篇关于Java调试:找不到源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!