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

Failed to Debug under WingIDE for setting “app.debug = True” #59

Closed
honglei opened this issue Oct 10, 2014 · 4 comments
Closed

Failed to Debug under WingIDE for setting “app.debug = True” #59

honglei opened this issue Oct 10, 2014 · 4 comments

Comments

@honglei
Copy link

honglei commented Oct 10, 2014

Windows8/Python2.7 64bit/WingIDE, using the build-in example in Flask-SocketIO.
I found that when using WingIDE, the breakpoints I set does not work.
Reason: flask_socketio/init.py run() invoked run_with_reloader(), whick make another python.exe process.
So I comments the 'app.debug = True' line, and all breakpoints become OK.

app = Flask(__name__)
#app.debug = True
app.config['SECRET_KEY'] = 'dosjfsodfa097324r3rn09dv66s8839bd'
socketio = SocketIO(app)
thread = None
@miguelgrinberg
Copy link
Owner

Yes, debugging with the reloader enabled gets tricky because the application runs in a child process. An improvement that I could make is to support the use_reloader argument in run(), like Flask's app.run() does. That will let you run in debug mode without the reloader.

@jwg4
Copy link
Contributor

jwg4 commented Nov 10, 2014

I found that without being able to pass use_reloader to socketio.run(), I couldn't run unit tests using selenium in the way suggested in the Flask book. WerkZeug tries to reload the executable "python -m unittest".

Maybe I'm missing something about how to do this? If not I would strongly support this enhancement being made.

@miguelgrinberg
Copy link
Owner

Are you running your unit tests with debug=True? You should have debug=False when you run your tests.

@jwg4
Copy link
Contributor

jwg4 commented Nov 11, 2014

Sorry about this! I have correctly added debug=False to the above and it now works.

Thanks a lot, sorry to report problems prematurely. I have removed a couple of previous comments where I still hadn't figured out where my mistake was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants