Skip to content

Commit

Permalink
Disable PYDEVD_USE_FRAME_EVAL by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Minaev authored and int19h committed Jan 19, 2023
1 parent 6c3dca7 commit 9fd3e72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/debugpy/_vendored/force_pydevd.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
os.environ[str("PYDEVD_DEBUG")] = str("True")
os.environ[str("PYDEVD_DEBUG_FILE")] = os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log")

# Disable pydevd frame-eval optimizations only if unset, to allow opt-in.
if "PYDEVD_USE_FRAME_EVAL" not in os.environ:
os.environ[str("PYDEVD_USE_FRAME_EVAL")] = str("NO")

# Constants must be set before importing any other pydevd module
# # due to heavy use of "from" in them.
with vendored('pydevd'):
Expand Down
2 changes: 1 addition & 1 deletion tests/debugpy/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def code_to_debug():
pass

using_frame_eval = backchannel.receive()
assert using_frame_eval == (frame_eval in ("yes", ""))
assert using_frame_eval == (frame_eval == "yes")


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

0 comments on commit 9fd3e72

Please sign in to comment.