Fix os.environ encoding on Python 2.7.

This commit is contained in:
Pavel Minaev 2020-08-25 18:59:28 -07:00
parent 677fef79d1
commit 6200c1db4f

View file

@ -22,13 +22,13 @@ if _unvendored:
# If debugpy logging is enabled, enable it for pydevd as well
if "DEBUGPY_LOG_DIR" in os.environ:
os.environ["PYDEVD_DEBUG"] = str("True")
os.environ["PYDEVD_DEBUG_FILE"] = os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log")
os.environ[str("PYDEVD_DEBUG")] = str("True")
os.environ[str("PYDEVD_DEBUG_FILE")] = os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log")
# Work around https://github.com/microsoft/debugpy/issues/346.
# Disable pydevd frame-eval optimizations only if unset, to allow opt-in.
if "PYDEVD_USE_FRAME_EVAL" not in os.environ:
os.environ["PYDEVD_USE_FRAME_EVAL"] = str("NO")
os.environ[str("PYDEVD_USE_FRAME_EVAL")] = str("NO")
# Constants must be set before importing any other pydevd module