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

后端 未结 15 1154
庸人自扰
庸人自扰 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 02:50

    This is a common error while debug in eclipse. You can fix it through edit source look up. But make sure once you attach the Project You need to stop the server and again start in Debug mode. It will work.

    Here is the detail steps :

    Click on "Edit Source Lookup Path" button . Then click on Add button. Select Java Project and include your imported project Then stop the server and start it in Debug mode and hit your service. It will work.

    0 讨论(0)
  • 2020-12-05 02:50

    I solved this problem by adding the class file into the src folder within the project. Hope this method may help.

    0 讨论(0)
  • 2020-12-05 02:52

    We had the same problem and none of the suggestions above worked. What did work, was deleting the local workspace and from Eclipse checking out from the repository again. The problem occured for everybody previously working with Netbeans and making the switch to Eclipse.

    0 讨论(0)
  • 2020-12-05 02:57

    Sounds like the 'source lookup path' section if you edit the debug configuration isn't setup correctly?

    0 讨论(0)
  • 2020-12-05 02:57

    This is an expansion on JAB's answer: Click "Edit Source Lookup..." > Add... > Workspace Folder > Project > select your folder > check Search subfolders box > OK.

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

    I had similar problem with my eclipse maven project. I fought with this issue quite a long time then I tried to rebuild projet with

    mvn clean eclipse:eclipse
    

    and it helped.

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