use of org.eclipse.che.api.debug.shared.model.impl.action.ResumeActionImpl in project che by eclipse.
the class GdbDebuggerTest method resume.
private void resume() throws DebuggerException, InterruptedException {
gdbDebugger.resume(new ResumeActionImpl());
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.impl.action.ResumeActionImpl 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.ResumeActionImpl in project che by eclipse.
the class ZendDbgSessionTest method testBreaking.
@Test(groups = { "zendDbg" }, dependsOnGroups = { "checkPHP" })
public void testBreaking() throws Exception {
List<Breakpoint> breakpoints = new ArrayList<>();
Breakpoint bp1 = new BreakpointImpl(ZendDbgLocationHandler.createDBG(dbgHelloFile, 4));
Breakpoint bp2 = new BreakpointImpl(ZendDbgLocationHandler.createDBG(dbgClassesFile, 10));
breakpoints.add(bp1);
breakpoints.add(bp2);
triggerSession(dbgHelloFile, getDbgSettings(false, false), breakpoints);
awaitBreakpointActivated(bp1);
awaitBreakpointActivated(bp2);
awaitSuspend(dbgHelloFile, 4);
debugger.resume(new ResumeActionImpl());
awaitSuspend(dbgClassesFile, 10);
}
use of org.eclipse.che.api.debug.shared.model.impl.action.ResumeActionImpl in project che by eclipse.
the class ZendDbgSessionTest method testSslConnection.
@Test(groups = { "zendDbg" }, dependsOnGroups = { "checkPHP" })
public void testSslConnection() throws Exception {
triggerSession(dbgHelloFile, getDbgSettings(true, true));
awaitSuspend(dbgHelloFile, 2);
debugger.resume(new ResumeActionImpl());
}
use of org.eclipse.che.api.debug.shared.model.impl.action.ResumeActionImpl in project che by eclipse.
the class ZendDbgSessionTest method testVariables.
@Test(groups = { "zendDbg" }, dependsOnGroups = { "checkPHP" })
public void testVariables() throws Exception {
List<Breakpoint> breakpoints = new ArrayList<>();
Breakpoint bp1 = new BreakpointImpl(ZendDbgLocationHandler.createDBG(dbgClassesFile, 16));
Breakpoint bp2 = new BreakpointImpl(ZendDbgLocationHandler.createDBG(dbgClassesFile, 25));
breakpoints.add(bp1);
breakpoints.add(bp2);
triggerSession(dbgHelloFile, getDbgSettings(false, false), breakpoints);
awaitBreakpointActivated(bp1);
awaitBreakpointActivated(bp2);
awaitSuspend(dbgClassesFile, 16);
StackFrameDump stackFrameDump = debugger.dumpStackFrame();
assertEquals(stackFrameDump.getVariables().size(), 1);
assertEquals(stackFrameDump.getVariables().get(0).getName(), "$this");
assertEquals(stackFrameDump.getVariables().get(0).getValue(), "A");
assertEquals(stackFrameDump.getVariables().get(0).getType(), "object");
debugger.resume(new ResumeActionImpl());
awaitSuspend(dbgClassesFile, 25);
stackFrameDump = debugger.dumpStackFrame();
assertEquals(stackFrameDump.getVariables().size(), 3);
assertEquals(stackFrameDump.getVariables().get(0).getName(), "$this");
assertEquals(stackFrameDump.getVariables().get(0).getValue(), "B");
assertEquals(stackFrameDump.getVariables().get(0).getType(), "object");
assertEquals(stackFrameDump.getVariables().get(1).getName(), "$p");
assertEquals(stackFrameDump.getVariables().get(1).getValue(), "123");
assertEquals(stackFrameDump.getVariables().get(1).getType(), "int");
assertEquals(stackFrameDump.getVariables().get(2).getName(), "$v");
assertEquals(stackFrameDump.getVariables().get(2).getValue(), "\"B\"");
assertEquals(stackFrameDump.getVariables().get(2).getType(), "string");
}
Aggregations