Skip to content

Commit 9fd3e72

Browse files
Pavel Minaevint19h
Pavel Minaev
authored andcommitted
Disable PYDEVD_USE_FRAME_EVAL by default.
1 parent 6c3dca7 commit 9fd3e72

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/debugpy/_vendored/force_pydevd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
os.environ[str("PYDEVD_DEBUG")] = str("True")
2323
os.environ[str("PYDEVD_DEBUG_FILE")] = os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log")
2424

25+
# Disable pydevd frame-eval optimizations only if unset, to allow opt-in.
26+
if "PYDEVD_USE_FRAME_EVAL" not in os.environ:
27+
os.environ[str("PYDEVD_USE_FRAME_EVAL")] = str("NO")
28+
2529
# Constants must be set before importing any other pydevd module
2630
# # due to heavy use of "from" in them.
2731
with vendored('pydevd'):

tests/debugpy/test_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def code_to_debug():
325325
pass
326326

327327
using_frame_eval = backchannel.receive()
328-
assert using_frame_eval == (frame_eval in ("yes", ""))
328+
assert using_frame_eval == (frame_eval == "yes")
329329

330330

331331
@pytest.mark.parametrize("run", [runners.all_launch[0]])

0 commit comments

Comments
 (0)