Expected Behavior
Debugger should show the right request object.
Paste a minimal example that causes the problem.from flask import Flask, request app = Flask(__name__) @app.route('/') def hello_world(): print(request) x = y return 'Hello, World!' if __name__ == "__main__": app.run(debug=True)
Actual Behavior
We're seeing some honestly kind of dumbfounding behavior that makes no sense to us. I'm not a novice when it comes to troubleshooting things, but this one really baffles me because I'm basically certain I'm not doing anything weird.
Debugger doesn't show the right "request" object often. See https://pasteboard.co/HqFNzwq.png for a screenshot of a case where the browser's URL bar shows the right thing, printing the request object shows the right thing in console logs, but using the debugger does not.
The request object is sometimes unbound, sometimes right, and seemingly often "off by 1" based on history.
So far, we can only seem to reproduce this on Linux, using Chrome and Firefox (edit: at first we thought it wasn't happening with Firefox but we found a repro with Firefox on Ubuntu 16.04 ). It doesn't seem to be happening from a Mac OS chrome client.
Environment
- Python version: both 2.7 and 3.6 (in virtualenv-based environments)
- Flask version: 1.0.x and it seems 0.12 as well
- Werkzeug version: 0.14.1
- Linux version(s): Ubuntu 18.04 , Ubuntu 16.04
- Chrome: Chrome/65.0.3325.183