Disable tracing at thread shutdown. debugpy:492
@@ -916,6 +916,10 @@ class _NewThreadStartupWithTrace:
ret = self.original_func(*self.args, **self.kwargs)
finally:
if thread_id is not None:
+ if py_db is not None:
+ # At thread shutdown we only have pydevd-related code running (which shouldn't
+ # be tracked).
+ py_db.disable_tracing()
py_db.notify_thread_not_alive(thread_id)
return ret
