use of org.eclipse.che.api.debug.shared.model.event.SuspendEvent in project che by eclipse.
the class GdbDebuggerTest method startDebugger.
private void startDebugger() throws DebuggerException, InterruptedException {
gdbDebugger.start(new StartActionImpl(Collections.emptyList()));
assertEquals(events.size(), 1);
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
SuspendEvent suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getTarget(), "h.cpp");
assertEquals(suspendEvent.getLocation().getLineNumber(), 7);
}
use of org.eclipse.che.api.debug.shared.model.event.SuspendEvent in project che by eclipse.
the class GdbDebuggerTest method stepOver.
private void stepOver() throws DebuggerException, InterruptedException {
gdbDebugger.stepOver(new StepOverActionImpl());
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
SuspendEvent suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getTarget(), "h.cpp");
assertEquals(suspendEvent.getLocation().getLineNumber(), 5);
gdbDebugger.stepOver(new StepOverActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getTarget(), "h.cpp");
assertEquals(suspendEvent.getLocation().getLineNumber(), 6);
gdbDebugger.stepOver(new StepOverActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getTarget(), "h.cpp");
assertEquals(suspendEvent.getLocation().getLineNumber(), 7);
}
use of org.eclipse.che.api.debug.shared.model.event.SuspendEvent in project che by eclipse.
the class GdbDebuggerTest method stepOut.
private void stepOut() throws DebuggerException, InterruptedException {
try {
gdbDebugger.stepOut(new StepOutActionImpl());
} catch (DebuggerException e) {
// ignore
}
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
}
use of org.eclipse.che.api.debug.shared.model.event.SuspendEvent in project che by eclipse.
the class AbstractZendDbgSessionTest method awaitSuspend.
protected void awaitSuspend(String dbgFile, int lineNumber) throws Exception {
DebuggerEvent debuggerEvent = dbgEvents.poll(5, TimeUnit.SECONDS);
if (debuggerEvent == null) {
throw new Exception("Suspend event timeout occurred.");
}
assertTrue(debuggerEvent instanceof SuspendEvent);
SuspendEvent suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getResourcePath(), dbgFile);
assertEquals(suspendEvent.getLocation().getLineNumber(), lineNumber);
}
Aggregations