Skip to content

Commit 748a9c3

Browse files
authored
Making detection of whether a debugger is currently attached more flexible. (#111)
Previously, the debugger was only recognized if the name was matching exactly one of the well-known debugger names, which was not working as expected on MacOS. With these changes, a debugger that is called `pydevd_frame_evalaluator_darwin_39_64` would also be recognized by the prefix `pydevd_frame_evaluator`, thus disabling timeouts.
1 parent f8a46a1 commit 748a9c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_timeout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def is_debugging(trace_func=None):
179179
if trace_func and inspect.getmodule(trace_func):
180180
parts = inspect.getmodule(trace_func).__name__.split(".")
181181
for name in KNOWN_DEBUGGING_MODULES:
182-
if name in parts:
182+
if any(part.startswith(name) for part in parts):
183183
return True
184184
return False
185185

0 commit comments

Comments
 (0)