Java source code not shown in Eclipse debug view

I am doing remote debugging of a Java application and am using the Eclipse debugging view. The main debugging process is working fine, and I see the method stack trace in the debug view at the corresponding breakpoints. However, I do not see the corresponding source code in the tab below, and it says:

Source not found.

The source files are already in my Eclipse project, and I see them in the Java view. I edited the source search paths and added * .java files to it. But even then, I do not see the source code in the debug view, where execution stops. Any clues about this would be appreciated.

+6
source share
3 answers

For the Run / Debug configuration that you used for remote debugging, follow these steps:

  • "Run β†’ Debug Configurations ..."
  • Select the remote config from the tree on the left
  • Click the Source tab
  • Click "Add ..."
  • Follow the instructions in the wizard (add a project containing a debugged source).

If so, can you post a snapshot of Run Configuration ?

What I usually did with the Remote Debug startup configuration is Add Source as Java Projects on the Source tab in the Run / Remote Debug configuration. Thus, to add a project called so , I would do the following:

enter image description here

And when choosing a project, select two checkboxes:

enter image description here

The result is:

enter image description here

+12
source

I took the following steps and it worked for me:

  • Run> Run Configurations
  • Java Application> Click the Source Tab
  • Turn on the project by selecting the "File system directory" option
  • Debugging started showing source code.
+3
source

You are probably using JRebel, which automatically recompiles and reloads classes. Unfortunately, Eclipse Debugger does not work with a class loaded this way. To ensure that Eclipse will work with the class after the changes, you need to reload the web application container.

+1
source

Source: https://habr.com/ru/post/923383/


All Articles