Bug 374257 - Allow disabling SMAP (JSR-45) support for a debug target
Summary: Allow disabling SMAP (JSR-45) support for a debug target
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.8   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 11:27 EDT by Justin Spadea CLA
Modified: 2012-03-14 12:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Spadea CLA 2012-03-14 11:27:20 EDT
It would be really nice if we could set a flag on the IJavaDebugTarget indicating that SMAP information should be ignored. This should cause the Java source to be displayed in the stack, and breakpoints in the Java source would be honored. Stratum breakpoints would be ignored. Changing this setting would ideally take effect immediately.

The use case for this is our language (EGL) generates into Java, and those developers who contribute to the generator would be able to switch between EGL and Java views. Right now to debug the generated code you have to disable our SMAP builder and clean the project to remove the SourceDebugExtension attribute from the classes. Then enable the builder and clean the project again to go back to debugging the EGL.
Comment 1 Sebastian Zarnekow CLA 2012-03-14 11:45:02 EDT
Did you try to select "Java" from the source menu on the context menu of the stackframe? It allows to switch between Java and other installed strate on the fly.
Comment 2 Justin Spadea CLA 2012-03-14 12:23:17 EDT
Whoa - excellent! This does most of what I'm looking for. A few suggestions:

1. Put the context menu on the thread, target, and launch too, so it's more obvious (it takes effect for all frames anyway).

2. Refresh the display of the frames so that they immediately switch from "foo.egl line: 20" to "foo.java line: 64".

3. Re-register breakpoints; currently only new breakpoints in the Java source take effect, and the stratum breakpoints are still being hit.

It looks like I might be able to add my own action that does these steps, I'll play around with it some more when I get a chance.