Eclipse java debugging: source not found

后端 未结 30 1638
Happy的楠姐
Happy的楠姐 2020-11-22 15:43

While debugging a java app in eclipse I receive a \"Source not found\" error in two cases:

  • Stepping in to a file in a different project which
相关标签:
30条回答
  • 2020-11-22 16:44

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

    mvn clean eclipse:eclipse
    

    and it helped.

    Note: Using this approach will confuse the m2e plugin since the two approaches are very different. m2e adds a virtual node to your project called "Maven Dependencies" and asks Maven to add all dependencies there.

    mvn eclipse:eclipse, on the other hand, will create a lot of individual entries in the file .classpath. Eclipse will handle them as if you manually added JARs to your project.

    Unless you know how the classpath in Eclipse works, this approach is not recommended.

    0 讨论(0)
  • 2020-11-22 16:44

    I had the problem that my Eclipse was not debugging the source code of my project. I was getting a blank page with "Source code node found".

    Please click the Attach source code button. Then delete the "default" folder then click add and go to your project location and attach. This worked for me

    0 讨论(0)
  • 2020-11-22 16:45

    If you are on eclipse or STS please install and Use GC(GrepCode Plugin) ,some time you don't need to attach the source .zip file into your project path so GrepCode works fine for you.

    0 讨论(0)
  • 2020-11-22 16:45

    Attach source -> Add -> External Archive -> select the jar -> open -> done

    the catch is look for the sources jar and attach this jar.

    for example the jar ends with "-sources" Stax2-api-3.4.1-sources

    0 讨论(0)
  • 2020-11-22 16:46

    I had the very same problem. In my case, I've disabled Window-Preferences-Java-Debug [Suspend execution on uncaught exceptions]. Then, the console showed me the correct error: my MySql user hadn't privileges to access the database. According to this topic.

    0 讨论(0)
  • 2020-11-22 16:47

    In my case, even after Editing source lookup and Adding project, it didn't worked. I configured the Build path of the project.

    After that, I selected JRE System Library and it worked.

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