Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355412

Summary: Debug stops on breakpoint showing wrong EGL source file
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jspadea
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Projects exported to archive file none

Description Kathy Carroll CLA 2011-08-22 12:23:04 EDT
Created attachment 201936 [details]
Projects exported to archive file

I have two projects and each has a library named EString009.  I have the breakpoint set in the first project.  Debugging stops on the breakpoint indicating the correct line number; however, the source of the second project library is in the editor. 

Load the attached projects and set a breakpoint on line 92 of api.eglx_lang.EString009.egl.  

Debug eunitgen.RunAllTests_pgms
Comment 1 Justin Spadea CLA 2011-08-22 15:24:45 EDT
This is actually caused by JDT - they provide all the source lookup, and what's happening is for resource that do not end in .java they search if the path to the file can be found in the project, then they check the folders, and folders within folders, etc; if the file is not found it then does this check on dependent projects. So the problem is that the path "api/eglx_lang/EString009.egl" gets found when it checks "ECK.eunit.java/EGLSource/eunitgen". For .java files it only checks inside source folders, which is why it's not an issue with non-SMAP debugging.

Rather than open a defect on JDT and wait who knows how long for a fix (a fix that wouldn't be part of 3.6), I found a way to work around this. I now override the source director on the launch configuration when wrapping the debug target, which puts an EGL source lookup routine ahead of the Java routines, which checks the package fragment roots (EGLSource & eglars) along the EGL path of the originating project.

Fortunately this code was already written for RUI debugging, I just had to do some refactoring so that it gets shared between Java and RUI debugging.
Comment 2 Kathy Carroll CLA 2011-08-23 09:26:19 EDT
verified
Comment 3 Lisa Lasher CLA 2011-10-11 16:25:06 EDT
Closing this defect.