eclipse debug时为什么显示source insight debugnot found

&本站源码:
DevNote公布网站源代码,点击这里查看。
&扫描二维码下载Android客户端:
或直接点击二维码图片下载到电脑
&所有系列:
&博主排名TOP5:
&广告赞助:
原创&Maven 项目debug调试时报Source not found.异常
作者:,&&
发表于: 10:32:37,&&
更新于: 10:41:35,&&
正如异常描述,那么解决方法当然是指定源码。
测试于:Maven 3.0.5, eclipse-jee-indigo-SR2-win32
异常信息:
Source not found.
解决方法:
首先要先将正在调试的项目停止;
右键项目 -& Debug As -& Debug Configurations ...
在左侧选择项目对应的启动配置 -& 选中Default -& Remove
点击上图中的Add -& 选Java Project -& 选中对应的项目源码 -& OK
如过此内容对您有帮助,欢迎以点击广告的形式来支持我们,但请每天不要多于一次,否则可能被识别恶意点击,导致封号。
相关文章:下次自动登录
现在的位置:
& 综合 & 正文
在Eclipse下debug 出现Source not found for … (转)
from:http://blog.csdn.net/dohkoos/archive//166447.aspx
在Eclipse下调试Servlet出现了Source not found for XxxAction.execute(...)的问题,猜想是没有将Servlet加入到debug路径下,以致在调试的时候找不到Source,虽知道原因,却不知道怎么解决。只能在Eclipse 里乱逛,东点西击,不经意间终于发现了在问题所在。路径是Window --& Preferences --& Tomcat --& Source Path,在Source Path 标签下有行文字:Add java projects to source path(Eclipse debugger will search for source files in these projects),将要调试的project选中,然后在调试,果然OK了!!
&&&&推荐文章:
【上篇】【下篇】Post Reply
Bookmark Topic
Debugging in Eclipse, Source not found
Sean Booysen
My first post and hopefully 1 of many more for what looks like a great community.
I just started using
and Eclipse (Juno). While trying to debug a program I am getting a source not found error but when I press F3 I can view the source code for the offending line.
This is an example line:
SessionSettings settings = new SessionSettings(inputStream);
It causes the "Source not found" error when I try step into it with F5.
Yet SessionSettings.java exists and I can easily view the code.
I must be missing something simple, but can't find what it is, despite a lot of searching.
BalaMurali dhar
Ranch Hand
there is a problem with your code.
Greg Charles
Posts: 2984
Hi Sean, welcome to JavaRanch!
Yes, Eclipse is baffling sometimes. Here's something to try. Right-click on your project, then click on Properties. In the Properties dialog, click on Java Build Path. In the Source tab, you should see the folder where your Java code is. If not, then add it. That may be the problem, but just in case, I'm going to move this thread to our IDE forum, where the real experts can take a crack at it.
James Boswell
Posts: 1051
When running in debug mode, right click on the running thread (in threads tab) and select Edit Source Lookup. At this point, you should be able to add the necessary project/jar which contains your source code.
Sean Booysen
Thanks for the suggestions. I have looked at the Build Path and it seems to have the source code path linked. I say "seems" because this is an open source project I am trying to debug and the Project structure is quite complicated. If I try explicitly add the directory with the source code it causes all sorts of other errors, probably caused by conflicting sources?
The project is the QuickFIXJ project, the Banzai example.
The other issue I am finding is that it when I press F5 it also tries to move into the actual Java SDK source. I would not expect this as I am sure people don't want to step through the entire Java source code while debugging their programs! So I probably have some setting that I am missing as I only want to debug the code relevant to the project.
Notice that the issue is occurring with the "new" functionality ("SessionSettings settings = new SessionSettings(inputStream);"). I would have thought that this would move to the source code containing the class definition, namely SessionSettings.java, but perhaps it is moving into the internal Java code for class instantiation, and then saying source not found?
Sean Booysen
Thanks to a friend of mine this problem is solved. Enabling step filters in order to prevent stepping into JDK code solves the problem, since I don't have the source code for the JDK.
Greg Charles
Posts: 2984
Ah, so you were stepping into a Java API class, not your own code? In any case, thanks for coming back to this thread and posting your solution!
Sean Booysen
Well the last line of code before pressing F5 was my own, but from there it was stepping into the JDK without me realizing it. Never even crossed my mind really because it is not something that would happen with C++ or C# debuggers
Greg Charles
Posts: 2984
F5 means Step Into. If you want don't want to Step Into, use F6, Step Over. I'm extremely skeptical of your implied claim that you can't step into C-sharp API classes. Hang on, we've got an emoticon for that ... ah, here it is:
Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Post Reply
Bookmark Topic
Similar Threads在Eclipse中Debug 为什么显示source not found_百度知道
在Eclipse中Debug 为什么显示source not found
提问者采纳
原因尚且未知,解决方法如下:Debug 视图下-》在调试的线程上 右键单击-》选择Edit Source Lookup Path-》选择Add-》选择Java Project选择相应的Project 进行OK确定即可
提问者评价
相关专业回答
这说明程序已经调试进入到类库的层次了,并且当前ide中没有关联 此类库的代码,此时,应该跳出该方法,因为类库中的方法是经过严格测试的,一般情况下不会出现问回到自己的方法,找到问题所在。应该先查看下eclipse的调试工具用法,理解他们的含义,然后在来调试程序。
其他类似问题
为您推荐:
其他2条回答
因为你debug过错中 进入了一些class文件 而这些class文件你只有jar包 没有他们的源代码
tomcat server.xml debug=0 如果设置的是1 就会显示source not found
debug的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}

我要回帖

更多关于 jad source not found 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信