Eclipse调试器事件 [英] Eclipse Debugger Events
问题描述
在我的Eclipse插件中,我想通知调试器事件(例如,当步进或断点被击中时)。我已经设法在JDT环境中使用这个代码订阅调试事件:
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)
{
}
在JDT中,这是在Breakpoint或Suspend事件触发的,我希望CDT中的行为是一样的。但是,不是。我在调试会话开始时只得到两个Create事件:
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]
DebugEvent[org.eclipse.cdt.dsf.gdb.launching.GDBProcess@ae0aae, CREATE, UNSPECIFIED] DebugEvent[org.eclipse.debug.core.model.RuntimeProcess@920d5d, CREATE, UNSPECIFIED]
有没有一般的解决方案,不需要特定依赖于JDT或CDT?
Is there a generic solution that wouldn't require specific dependencies on JDT or CDT?
谢谢,
Alan
Thanks, Alan
推荐答案
我找到了一个解决方案,并回答了我的另一个问题: Eclipse插件 - 处理或打破时处理事件
I did find a solution and have answered my other question here: Eclipse plugin - handling events when stepping or breaking
Alan
这篇关于Eclipse调试器事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!