前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Eclipse里调试时遇到Source not found应该怎么办

Eclipse里调试时遇到Source not found应该怎么办

作者头像
Jerry Wang
发布2020-08-20 16:29:24
8000
发布2020-08-20 16:29:24
举报

When you are debugging in Eclipse, sometimes when you debug into a method, you will meet with “Source not found” message, for example below.

In my example, this is because the corresponding source code for AbstractTypeHierarchyTraversingFilter does not exist in local workspace. The source code could not be automatically downloaded via “Maven -> Download Sources”.

[Note] This very issue in this example could also be resolved by changing dependency configuration in pom.xml. Please read this blog about what exactly should be defined in pom.xml if different Spring component is planned to be used in your application. In my example, after I add the missing dependency “spring-core” in pom.xml and re-download source via Maven plugin, the source code is then visible in debugger.

Solution

(1) Google with keyword as below:

Click the first hit web page. (2) Go to the corresponding download page for your spring framework version:

You could find your Spring version in pom.xml, dependency block:

(3) Download the .java source file. Create a series of nested folders whose hierarchy exactly match the package declaration in java file. In my example, the folder structure should look like below:

Then make a zip file based on this folder. (4) Click “Change Attached Source…” to load the zip file created in step3.

After that the source code of AbstractTypeHierarchyTraversingFilter is visible in debugger now.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-19 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Solution
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档