use of org.eclipse.che.api.debug.shared.model.impl.action.StartActionImpl in project che by eclipse.
the class AbstractZendDbgSessionTest method triggerSession.
protected void triggerSession(String dbgFile, ZendDbgSettings dbgSettings, List<Breakpoint> dbgBreakpoints) throws Exception {
ZendDbgLocationHandler dbgLocationMapper = mock(ZendDbgLocationHandler.class);
// No need to convert between VFS and DBG for test purposes
when(dbgLocationMapper.convertToVFS(anyObject())).then(returnsFirstArg());
when(dbgLocationMapper.convertToDBG(anyObject())).then(returnsFirstArg());
debugger = new ZendDebugger(dbgSettings, dbgLocationMapper, dbgEvents::add);
debugger.start(new StartActionImpl(dbgBreakpoints));
dbgEngineProcess = Runtime.getRuntime().exec("php " + dbgFile, new String[] { dbgSettings.isUseSsslEncryption() ? QUERY_SSL : QUERY_NO_SSL });
}
use of org.eclipse.che.api.debug.shared.model.impl.action.StartActionImpl in project che by eclipse.
the class JavaDebuggerTest method testStartDebugger.
@Test(priority = 2)
public void testStartDebugger() throws Exception {
BreakpointImpl breakpoint = new BreakpointImpl(new LocationImpl("com.HelloWorld", 17), false, null);
debugger.start(new StartActionImpl(singletonList(breakpoint)));
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof BreakpointActivatedEvent);
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
Location location = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(location.getLineNumber(), 17);
assertEquals(location.getTarget(), "com.HelloWorld");
}
use of org.eclipse.che.api.debug.shared.model.impl.action.StartActionImpl 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);
}
Aggregations