use of org.eclipse.che.api.debug.shared.model.impl.BreakpointImpl in project che by eclipse.
the class ZendDbgSessionTest method testSetValue.
@Test(groups = { "zendDbg" }, dependsOnGroups = { "checkPHP" })
public void testSetValue() throws Exception {
List<Breakpoint> breakpoints = new ArrayList<>();
Breakpoint bp1 = new BreakpointImpl(ZendDbgLocationHandler.createDBG(dbgHelloFile, 5));
breakpoints.add(bp1);
triggerSession(dbgHelloFile, getDbgSettings(false, false), breakpoints);
awaitBreakpointActivated(bp1);
awaitSuspend(dbgHelloFile, 5);
StackFrameDump stackFrameDump = debugger.dumpStackFrame();
int lastVar = stackFrameDump.getVariables().size() - 1;
Variable variableToFind = new VariableImpl(null, null, "123", false, new VariablePathImpl(String.valueOf(lastVar)), Collections.emptyList(), false);
debugger.setValue(variableToFind);
assertEquals(stackFrameDump.getVariables().get(lastVar).getValue(), "123");
variableToFind = new VariableImpl(null, null, "\"ABC\"", false, new VariablePathImpl(String.valueOf(lastVar)), Collections.emptyList(), false);
debugger.setValue(variableToFind);
assertEquals(stackFrameDump.getVariables().get(lastVar).getValue(), "\"ABC\"");
}
use of org.eclipse.che.api.debug.shared.model.impl.BreakpointImpl in project che by eclipse.
the class GdbContinue method parse.
/**
* Factory method.
*/
public static GdbContinue parse(GdbOutput gdbOutput) throws GdbParseException {
String output = gdbOutput.getOutput();
for (String line : output.split("\n")) {
Matcher matcher = GDB_BREAKPOINT.matcher(line);
if (matcher.find()) {
String file = matcher.group(1);
String lineNumber = matcher.group(2);
Location location = new LocationImpl(file, Integer.parseInt(lineNumber));
return new GdbContinue(new BreakpointImpl(location));
}
}
return new GdbContinue(null);
}
Aggregations