We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d41ba8 commit fa5fd45Copy full SHA for fa5fd45
pytest_timeout.py
@@ -290,6 +290,10 @@ def is_debugging(trace_func=None):
290
for name in KNOWN_DEBUGGING_MODULES:
291
if any(part.startswith(name) for part in parts):
292
return True
293
+
294
+ # For 3.12, sys.monitoring is used for tracing. Check if any debugger has been registered.
295
+ if hasattr(sys, "monitoring"):
296
+ return sys.monitoring.get_tool(sys.monitoring.DEBUGGER_ID) != None
297
return False
298
299
0 commit comments