Add ability to select PyQt debug mode via environment variable for testing
from __future__ import nested_scopes
+import os
def set_trace_in_qt():
import pydevd_tracing
@@ -20,6 +21,9 @@ def patch_qt(qt_support_mode):
# do not break backward compatibility
qt_support_mode = 'auto'
+ if qt_support_mode == 'auto':
+ qt_support_mode = os.getenv('PYDEVD_PYQT_MODE', 'auto')
+
# Avoid patching more than once
global _patched_qt
if _patched_qt:
