use of org.eclipse.che.api.debug.shared.model.StackFrameDump 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\"");
}
Aggregations