I had a problem recently where Eclipse couldn’t find my source files when remote debugging a particular application. It would stop and the breakpoint and show the class file with a “attach source” button, but pointing it to the source directory didn’t do anything.
It turns out that the solution was to add the project to the remote debug configuration.
This is done by “Run -> Debug configurations…”
Choose the remote config from the tree on the left
Click on the “Source” tab
Click on the “Add…” button
Follow the wizard.
Hope this helps anyone with the same problem.
Helped, thanks. When adding source, and you select your entire workspace, just watch out when you have multiple copies of the same project, e.g. a branch and trunk, since then the debugger may select you branch code, even though you had a breakpoint in trunk.
Hi,
This post was very useful. Even though i added the project dependency in the build path i got the error src can’t found. When I add as u said the problem is resolved.
Thanks.
I’m glad this information was helpful. I’m surprised that this post continues to get the most hits from Google.
It helped me too, thanks! What’s weird is that it was a debug config that I’ve been using for months. I wonder how the source got dropped, but I’m glad I got it fixed.