Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable frame eval mode by default. #878

Merged
merged 1 commit into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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