Skip to content

Commit

Permalink
Re-enable frame eval mode by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Apr 1, 2022
1 parent 2ac9538 commit e15e074
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/debugpy/_vendored/force_pydevd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,11 @@
# raise ImportError(msg)
warnings.warn(msg + ':\n {}'.format('\n '.join(_unvendored)))


# If debugpy logging is enabled, enable it for pydevd as well
if "DEBUGPY_LOG_DIR" in os.environ:
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[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 All @@ -55,7 +48,7 @@
# When pydevd is imported it sets the breakpoint behavior, but it needs to be
# overridden because by default pydevd will connect to the remote debugger using
# its own custom protocol rather than DAP.
import pydevd # noqa
import pydevd # noqa
import debugpy # noqa


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 @@ -327,7 +327,7 @@ def code_to_debug():
pass

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


@pytest.mark.skipif(
Expand Down

0 comments on commit e15e074

Please sign in to comment.