Sunday, 23 August 2015

How to Fix the "Source Not Found" Error While Debugging in Eclipse


     In this post, we will learn how to resolve the "Source not found" error while debugging an application in Eclipse.

If you run your web application on a Java EE server and start it in Debug mode, you may encounter the "Source not found" error when execution reaches a breakpoint. This happens when Eclipse cannot locate the source code for the class being executed.

See the screenshot below.


Source not found error in eclipse
Source not found error screen

    To resolve the above problem, follow the steps below:
  1. Click "Edit Source Lookup Path". The "Edit Source Lookup Path" dialog box (new window) will appear, as shown below.


Edit source Lookup Path
Edit Source Lookup Path

  1. Click the "Add" button in the "Edit Source Lookup Path" window.

Add Java Project
Add Java Project

  1. Select "Java Project" and click the "OK" button. The "Project Selection" window will open.


Project Selection
Project Selection

  1. Select the appropriate project and click "OK".


Select appropriate Project
Project selected



























  1. Click "OK" to save the selected project. You should now be able to debug the application without encountering the "Source not found" error.


Ok for Selected Project
Debug working fine


1 comment:

  1. After adding project also I am getting same 'source not found' error

    ReplyDelete