From 18529bef9bee61b6221eda8284980ef26c255c91 Mon Sep 17 00:00:00 2001 From: Andrey Lisin Date: Wed, 27 Mar 2024 10:26:31 +0100 Subject: [PATCH] PY-71546 Add registry flag for enabling debugger diagnostic prints GitOrigin-RevId: 27347f89d702def97c95a1c6c782a63f66351a2d --- python/src/com/jetbrains/python/debugger/PyDebugRunner.java | 5 +++++ python/src/intellij.python.community.impl.xml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/python/src/com/jetbrains/python/debugger/PyDebugRunner.java b/python/src/com/jetbrains/python/debugger/PyDebugRunner.java index 81cdafd42bcb..3e522bbebe16 100644 --- a/python/src/com/jetbrains/python/debugger/PyDebugRunner.java +++ b/python/src/com/jetbrains/python/debugger/PyDebugRunner.java @@ -97,6 +97,7 @@ public class PyDebugRunner implements ProgramRunner { public static final @NonNls String PYDEVD_FILTERS = "PYDEVD_FILTERS"; public static final @NonNls String PYDEVD_FILTER_LIBRARIES = "PYDEVD_FILTER_LIBRARIES"; public static final @NonNls String PYDEVD_USE_CYTHON = "PYDEVD_USE_CYTHON"; + public static final @NonNls String PYCHARM_DEBUG = "PYCHARM_DEBUG"; public static final @NonNls String USE_LOW_IMPACT_MONITORING = "USE_LOW_IMPACT_MONITORING"; public static final @NonNls String CYTHON_EXTENSIONS_DIR = new File(PathManager.getSystemPath(), "cythonExtensions").toString(); @@ -688,6 +689,10 @@ public class PyDebugRunner implements ProgramRunner { if (!RegistryManager.getInstance().is("python.debug.enable.cython.speedups")) { environmentController.putFixedValue(PYDEVD_USE_CYTHON, "NO"); } + + if (RegistryManager.getInstance().is("python.debug.enable.diagnostic.prints")) { + environmentController.putFixedValue(PYCHARM_DEBUG, "True"); + } } /** diff --git a/python/src/intellij.python.community.impl.xml b/python/src/intellij.python.community.impl.xml index ca43a91a3210..030dc4f0c687 100644 --- a/python/src/intellij.python.community.impl.xml +++ b/python/src/intellij.python.community.impl.xml @@ -412,6 +412,9 @@ + +