mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Check if thread should not be traced before logging traced debugger thread warning
It's important to check the `pydev_do_not_trace` attribute before printing the warning because sometimes `run()` method's code is called in the same thread, e.g. in the `Dispatcher` class. The absence of this check leads to a confusing false-positive warning. GitOrigin-RevId: 62514d5cb99f0181631366d68fe914220fb168d7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4282d60421
commit
b7eadf86e1
@@ -235,7 +235,7 @@ class PyDBDaemonThread(threading.Thread):
|
||||
pydevd_tracing.SetTrace(None) # no debugging on this thread
|
||||
|
||||
def _warn_pydevd_thread_is_traced(self):
|
||||
if sys.gettrace():
|
||||
if self.pydev_do_not_trace and sys.gettrace():
|
||||
pydevd_log(1, "The debugger thread '%s' is traced which may lead to debugging performance issues." % self.__class__.__name__)
|
||||
|
||||
|
||||
|
||||
@@ -1810,7 +1810,7 @@ class Dispatcher(object):
|
||||
self.port = port
|
||||
self.client = start_client(self.host, self.port)
|
||||
self.reader = DispatchReader(self)
|
||||
self.reader.pydev_do_not_trace = False #we run reader in the same thread so we don't want to loose tracing
|
||||
self.reader.pydev_do_not_trace = False # We run reader in the same thread so we don't want to loose tracing.
|
||||
self.reader.run()
|
||||
|
||||
def close(self):
|
||||
|
||||
Reference in New Issue
Block a user