Also start suspending only in user code with suspend=True for remote debugger (PY-15515)

If suspending is started before starting some PyDBDaemonThreads, debugger stops inside library files
This commit is contained in:
Elizaveta Shashkova
2015-04-22 19:59:46 +03:00
parent 75afac2e7a
commit f59b5d4045

View File

@@ -2029,13 +2029,14 @@ def _locked_settrace(
# Stop the tracing as the last thing before the actual shutdown for a clean exit.
atexit.register(stoptrace)
PyDBCommandThread(debugger).start()
CheckOutputThread(debugger).start()
#Suspend as the last thing after all tracing is in place.
if suspend:
debugger.setSuspend(t, CMD_THREAD_SUSPEND)
PyDBCommandThread(debugger).start()
CheckOutputThread(debugger).start()
else:
# ok, we're already in debug mode, with all set, so, let's just set the break