Debugging support for custom language plugins
Hi,
I've written an Intellij plugin that provides editing and running capabilities for the Substeps BDD test framework (in essence, very similar to Cucumber, but with the addition of sub-steps).
Scenario steps are mapped to annotated java methods and execution is achieved by launching a server process to execute the tests which is then controlled via JMX calls, with callbacks to indicate progress through the test suite.
I have been able to create run and debug configurations that work and can launch the process successfully with the debug configuration also appending the correct jvm args to allow the launched process to be debugged remotely, however execution isn't stopping on any breakpoints I set in the java code. NB. initially I'm not interested in setting breakpoints in features and scenarios, just in the corresponding java code.
Based on some other posts on here, I've implemented JavaDebugAware, PositionManager and SubstepsPositionManagerFactory, setting debugger.javaDebugAware and debugger.positionManagerFactory in plugin.xml - I'm not sure if this is correct (or if I've done this correctly) as I can't see that any of these implementations are being called (from logs and breakpoints).
If anyone could shine any light on this or examples of other plugins to look, I'd really appreciate it! I'm a bit stumped at the moment!
Many thanks
https://github.com/iantmoore/substeps-intellij-plugin/tree/debugger-issues
Please sign in to leave a comment.
Java breakpoints should work without extra actions from your side. If they don't, try to debug around com.intellij.debugger.engine.JavaBreakpointHandler#registerBreakpoint and then deeper into com.intellij.debugger.ui.breakpoints.Breakpoint#createRequest.