PyDev fixes: don't stop on SystemExit

GitOrigin-RevId: fec99b4a86d5bd8259d76ce9bc1f9f1307dbd55f
This commit is contained in:
Andrey Lisin
2019-06-07 18:30:05 +03:00
committed by intellij-monorepo-bot
parent 1cba9cb422
commit 9cbf73ee18
3 changed files with 22 additions and 1 deletions
@@ -117,7 +117,7 @@ def stop_on_unhandled_exception(py_db, thread, additional_info, arg):
if tb is None: # sometimes it can be None, e.g. with GTK
return
if exctype is KeyboardInterrupt:
if exctype in (KeyboardInterrupt, SystemExit):
return
frames = []
+4
View File
@@ -0,0 +1,4 @@
import sys
if __name__ == '__main__':
sys.exit(0)
@@ -2076,6 +2076,23 @@ public class PythonDebuggerTest extends PyEnvTestCase {
});
}
@Test
public void testDontStopOnSystemExit() {
runPythonTest(new PyDebuggerTask("/debug", "test_sys_exit.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath(getScriptName()), 3);
}
@Override
public void testing() throws Exception {
waitForPause();
resume();
waitForOutput("Process finished with exit code 0");
}
});
}
@Test
public void testExecAndSpawnWithBytesArgs() {