In my Eclipse plugin, I would like to be notified on debugger events (e.g. when stepping or a breakpoint is hit). I’ve managed to get this working in a JDT environment by subscribing to debug events using this code:
DebugPlugin.getDefault().addDebugEventListener(this);
Which gives this event handler:
public void handleDebugEvents(DebugEvent[] events)
{
}
In JDT this is fired on Breakpoint or Suspend events and I was hoping the behaviour would be the same in CDT. However, it is not. I only get two Create events at the start of the debug session:
DebugEvent[org.eclipse.cdt.dsf.gdb.launching.GDBProcess@ae0aae, CREATE, UNSPECIFIED]
DebugEvent[org.eclipse.debug.core.model.RuntimeProcess@920d5d, CREATE, UNSPECIFIED]
Is there a generic solution that wouldn’t require specific dependencies on JDT or CDT?
Thanks,
Alan
I did find a solution and have answered my other question here: Eclipse plugin – handling events when stepping or breaking
Alan