use of org.eclipse.che.api.debug.shared.model.impl.action.StepOverActionImpl in project che by eclipse.
the class NodeJsDebuggerTest method testOver.
@Test
public void testOver() throws Exception {
debugger.stepOver(new StepOverActionImpl());
ArgumentCaptor<SuspendEvent> suspendEventCaptor = ArgumentCaptor.forClass(SuspendEvent.class);
verify(callback, timeout(1000)).onEvent(suspendEventCaptor.capture());
SuspendEvent suspendEvent = suspendEventCaptor.getValue();
assertEquals(suspendEvent.getLocation().getLineNumber(), 2);
assertTrue(suspendEvent.getLocation().getTarget().endsWith("app.js"));
}
use of org.eclipse.che.api.debug.shared.model.impl.action.StepOverActionImpl in project che by eclipse.
the class JavaDebuggerTest method testSteps.
@Test(priority = 9)
public void testSteps() throws Exception {
debugger.deleteAllBreakpoints();
debugger.addBreakpoint(new BreakpointImpl(new LocationImpl("com.HelloWorld", 20), false, null));
assertTrue(events.take() instanceof BreakpointActivatedEvent);
debugger.resume(new ResumeActionImpl());
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
Location location = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(location.getTarget(), "com.HelloWorld");
assertEquals(location.getLineNumber(), 20);
assertEquals(location.getExternalResourceId(), -1);
assertEquals(location.getResourceProjectPath(), "/test");
assertEquals(location.getResourcePath(), "/test/src/com/HelloWorld.java");
debugger.stepInto(new StepIntoActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
location = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(location.getTarget(), "com.HelloWorld");
assertEquals(location.getLineNumber(), 28);
debugger.stepOut(new StepOutActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
location = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(location.getTarget(), "com.HelloWorld");
assertEquals(location.getLineNumber(), 20);
debugger.stepOver(new StepOverActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
location = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(location.getTarget(), "com.HelloWorld");
assertEquals(location.getLineNumber(), 21);
debugger.stepOver(new StepOverActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
location = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(location.getTarget(), "com.HelloWorld");
assertEquals(location.getLineNumber(), 23);
debugger.stepOver(new StepOverActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
location = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(location.getTarget(), "com.HelloWorld");
assertEquals(location.getLineNumber(), 24);
}
use of org.eclipse.che.api.debug.shared.model.impl.action.StepOverActionImpl 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.impl.action.StepOverActionImpl in project che by eclipse.
the class ZendDbgSessionTest method testStepping.
@Test(groups = { "zendDbg" }, dependsOnGroups = { "checkPHP" })
public void testStepping() throws Exception {
triggerSession(dbgHelloFile, getDbgSettings(true, false));
awaitSuspend(dbgHelloFile, 2);
debugger.stepOver(new StepOverActionImpl());
awaitSuspend(dbgHelloFile, 4);
debugger.stepInto(new StepIntoActionImpl());
awaitSuspend(dbgClassesFile, 9);
debugger.stepOut(new StepOutActionImpl());
awaitSuspend(dbgHelloFile, 4);
}
Aggregations