From a2234341e35e352bbda603306ee0d804b635d0c5 Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Wed, 1 Nov 2023 17:40:32 +0000 Subject: [PATCH] feat(dev): add option to not attach trace function --- src/deep/processor/trigger_handler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/deep/processor/trigger_handler.py b/src/deep/processor/trigger_handler.py index b35028a..6cf1c1b 100644 --- a/src/deep/processor/trigger_handler.py +++ b/src/deep/processor/trigger_handler.py @@ -58,6 +58,10 @@ def __init__(self, config, push_service): self._config.add_listener(TracepointHandlerUpdateListener(self)) def start(self): + # if we call settrace we cannot use debugger, + # so we allow the settrace to be disabled, so we can at least debug around it + if self._config.NO_TRACE: + return sys.settrace(self.trace_call) threading.settrace(self.trace_call)