Fix tests: we should always check if suspend policy "All" is supported for the breakpoint type. Otherwise we break Django template debugging

This commit is contained in:
Elizaveta Shashkova
2016-06-24 15:47:26 +03:00
parent 3ee8b6d1e8
commit 94c2a1c325
@@ -533,7 +533,8 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
breakpoint = myRegisteredExceptionBreakpoints.get(exceptionName);
}
}
if ((breakpoint != null) && (breakpoint.getSuspendPolicy() == SuspendPolicy.ALL)) {
if ((breakpoint != null) && (breakpoint.getType().isSuspendThreadSupported()) &&
(breakpoint.getSuspendPolicy() == SuspendPolicy.ALL)) {
return true;
}
}
@@ -855,7 +856,7 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
}
}
if (breakpoint != null) {
if (breakpoint.getSuspendPolicy() == SuspendPolicy.ALL) {
if ((breakpoint.getType().isSuspendThreadSupported()) && (breakpoint.getSuspendPolicy() == SuspendPolicy.ALL)) {
suspendAllOtherThreads(threadInfo);
}
}