Eclipse里调试时遇到Source not found应该怎么办
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.
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的Eclipse里调试时遇到Source not found应该怎么办的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP系统里的胖接口Fat interf
- 下一篇: Binlog的三个业务应用场景