I get “Source not found” when debugging my Java code in Eclipse

后端 未结 15 1156
庸人自扰
庸人自扰 2020-12-05 02:31

I\'m trying to debug my Java application in Eclipse however when I hit a breakpoint I simply see the following instead of my source:

相关标签:
15条回答
  • 2020-12-05 03:01

    In Eclipse:Window-->Go to preferences-->Java-->Click on JRE-->Edit--->Restore Default and click on Finish.

    Update your Project before Debugging the code!

    Alas! It worked for me.

    0 讨论(0)
  • 2020-12-05 03:03

    After trying most of the solutions here, try this too once -

    Close all the .java files from the editor, in fact, close all unrelated projects in eclipse. And try running the Debugger.

    0 讨论(0)
  • 2020-12-05 03:04

    I also had this issue in MyEclipse Blue. I resolved it by following these steps:

    1. Debug the project.

    2. Right click on the Thread (Which you will see in Debug tab) and click on the "Edit Source lookup"

    3. New window will open and hit the "Add" button and Select the "Java Project".

    4. Get all the project that is listed over there.

    5. Restart your server.

    0 讨论(0)
  • 2020-12-05 03:05

    When I faced this problem for the very first time, I've already done all the steps mentioned here. Curiously, my problem happened when I've copied a project into another place. Anyway, the debug starts to work without warnings, after simply remove all breakpoints that was originated from the original project. Sorry about my English , I'm not fluent.

    0 讨论(0)
  • 2020-12-05 03:05

    For local projects I've solved it by selecting the "Resolve Workspace artifacts" checkbox in the Debug Configurations.

    0 讨论(0)
  • 2020-12-05 03:06

    I got this error when I was running my server using a maven tomcat plugin. When I deployed using my configured server in Eclipse (generating a war file and copying it into my tomcat directory), I didn't have this issue anymore.

    0 讨论(0)
提交回复
热议问题