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

Local variables not available in debug console in version 1.0 #1746

Closed
cgarrard opened this issue Mar 11, 2020 · 1 comment
Closed

Local variables not available in debug console in version 1.0 #1746

cgarrard opened this issue Mar 11, 2020 · 1 comment
Milestone

Comments

@cgarrard
Copy link

Take this simple script:

from werkzeug.wrappers import Request, Response

some_global_variable = True

@Request.application
def application(request):
    msg = 'Hello, World!'
    return Response(msg2)

if __name__ == '__main__':
    from werkzeug.serving import run_simple
    run_simple('localhost', 4000, application,
               use_reloader=True, use_debugger=True, use_evalex=True)

As expected, the application crashes when it tries to create the response because msg2 doesn't exist. With version 0.16.1 and Python 3.8, I can view the value of the msg variable in the debug console. But if I upgrade to version 1.0, msg is no longer defined. Global variables are available, however. Here's a screenshot:

image

@davidism
Copy link
Member

Duplicate of #1741

@davidism davidism added this to the 1.0.1 milestone Mar 17, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants