Attaching source files when debugging with Eclipse

When you are debugging a program if Eclipse does not find the source files it will show something like Source not found (For example when debugging a remote program that was not started by Eclipse). To fix this:

  1. Click Edit Source Lookup Path… from Source not found to open the Edit Source Lookup Path dialog.

    Source not found

  2. Click Add button from the Edit Source Lookup Path dialog.

    Edit Source Lookup Path dialog

  3. Select Java Project as the source.

    Add Source dialog

  4. Select projects.

    Project Selection dialog

  5. Confirm configuration.

    Edit Source Lookup Path confirmation