Skip to content

Commit

Permalink
Making detection of whether a debugger is currently attached more fle…
Browse files Browse the repository at this point in the history
…xible. (#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.
  • Loading branch information
apacha authored Nov 2, 2021
1 parent f8a46a1 commit 748a9c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def is_debugging(trace_func=None):
if trace_func and inspect.getmodule(trace_func):
parts = inspect.getmodule(trace_func).__name__.split(".")
for name in KNOWN_DEBUGGING_MODULES:
if name in parts:
if any(part.startswith(name) for part in parts):
return True
return False

Expand Down

0 comments on commit 748a9c3

Please sign in to comment.