Bug 565199 - Debugger does not properly use sources for maven libraries
Summary: Debugger does not properly use sources for maven libraries
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-14 05:44 EDT by D T CLA
Modified: 2022-07-07 07:44 EDT (History)
0 users

See Also:


Attachments
Screenshot displaying the different file/editor types (18.87 KB, image/png)
2020-07-14 05:44 EDT, D T CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description D T CLA 2020-07-14 05:44:55 EDT
Created attachment 283592 [details]
Screenshot displaying the different file/editor types

If I try to debug my applications/libraries (eclipse maven projects) the debugger shows the java file from the sources file.

But it shows the file as "java file" and not as a "java buildpath file", this causes the following issues:

- Does not show breakpoints (I can still create them using double click, it still doesn't show them)
- Cannot use the debug shell (To perform an evaluation, an expression must be compiled in the context of a Java project's build path. The current execution context is not associated with a Java project in the workspace.)
- Cannot use shift to jump into a method that is inherited (maybe also affect fields)

If I open the source files from the project's maven dependency entry, then it opens it as "java buildpath file"/"java class file" and I can see the breakpoints and can jump into the inherited methods. But it does not show the current debug step and any attempt to step to the next step brings the "java file" view back to the front. The debug shell doesn't work regardless of which view/editor is open.

If I forcefully delete (while eclipse is closed) the sources.jars and unlink them in the maven depedencies, then I can no longer see the sources of the debugged files, but I can use the debug shell including code completion.
Comment 1 Eclipse Genie CLA 2022-07-07 01:13:04 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 D T CLA 2022-07-07 07:44:27 EDT
The issue still persists.

I currently use a workaround by enabling "duplicate source lookup".
Interestingly enough both display the exact same file, just in different contexts (java-file vs java classpath-file).

Another workaround is removing the source.jars and using a decompiler to do the job.