abegehr
abegehr

Reputation: 569

How to use atom-ide-debugger-python to debug python code incl. variable watch and breakpoints

I want to use atom-ide-debugger-python to debug python app incl. variable watch and breakpoints.

The python app is a Flask server that I can start using python server.py.

In Atom python-ide I can set breakpoints and open the debugger sidebar. I get the options to attach or launch debugger. How do debug my Flask app started by server.py?

Thank you, Anton

Upvotes: 2

Views: 2260

Answers (1)

Si Mon
Si Mon

Reputation: 499

I had the same problem. You have to have to set the following in your app.run()

debug=True

use_reloader=False

otherwise it won't work.

Attaching is not yet supported, so click on "launch debugger" and there you can set the module you want to execute and the python path (useful if working with virtual environments) and your current working directory.

To toggle breakpoints: click F9 in the line

To watch variables: either type them out in the console or look at the scope in the sidebar.

Hope this helps.

Upvotes: 2

Related Questions