Tests: execute breakpoint adding command in the same thread to be sure it's done before resume

This commit is contained in:
Elizaveta Shashkova
2017-12-19 15:24:36 +03:00
parent 459659dc4f
commit 391a1d3575
@@ -428,7 +428,14 @@ public class RemoteDebugger implements ProcessDebugger {
public void setTempBreakpoint(@NotNull String type, @NotNull String file, int line) {
final SetBreakpointCommand command =
new SetBreakpointCommand(this, type, file, line);
execute(command); // set temp. breakpoint
try {
command.execute();
}
catch (PyDebuggerException e) {
if (isConnected()) {
LOG.error(e);
}
}
myTempBreakpoints.put(Pair.create(file, line), type);
}
@@ -440,7 +447,7 @@ public class RemoteDebugger implements ProcessDebugger {
execute(command); // remove temp. breakpoint
}
else {
LOG.error("Temp breakpoint not found for " + file + ":" + line);
LOG.warn("Temp breakpoint not found for " + file + ":" + line);
}
}