In a plugin for a custom language, what enables breakpoint-related actions?
I'm testing waters developing an IDE (must importantly, a debugger) for a proprietary language within my project at work. The language compiles to the JVM .class files and runs on the JVM. It was easy enough to make a prototype debugger in Eclipse piggybacking on JDT, with breakpoints and stepping all working. But Eclipse makes me sad, and I'd rather have it all in IntelliJ.
It was easy enough to set up a language and a run configuration, and subclass GenericDebuggerRunner to have everything running with the debugger attached. I can even set a method breakpoint from the "View Breakpoints" dialog. However, breakpoint-related actions on the Run menu (like "com.intellij.xdebugger.impl.actions.ToggleLineBreakpointAction") are disabled, and the breakpoint area in the gutter does nothing.
I'm having a hard time understanding the intended scheme of connecting those and my plugin. Any pointers appreciated.
Please sign in to leave a comment.
Start with implementing PositionManagerFactory, PositionManager, JavaDebugAware for your file type
Thank you, that was very helpful! I got breakpoints and stepping mostly working.
The other big item is customizing the presentation of execution artifacts. There are some "infrastructure" stack frames I don't want to appear in the Frames view. Frames that do appear should show just a substring of the actual Java method name. Similarly for locals, I want to filter some from the Variables view and change the presentation of others.
Looking around, I don't see an obvious easy way of plugging into that. Am I missing something? If not, what would be the reasonable way to go about it?
Try implementing com.intellij.debugger.engine.PositionManagerEx#createStackFrame in your position manager and create your own stackframes, probably extended from JavaStackFrame with your own getVisibleVariables and customizePresentation.