Django - using interactive pdb debugging to run a wsgi application

If I create a Django application and use the included test server, I can simply add import pdb; pdb.set_trace() import pdb; pdb.set_trace() anywhere in the code and have a breakpoint that throws me into an interactive debugger. To make everything clear, I do not mean using any IDE, just a simple ssh-ing configuration in VM or a remote dev server.

How can I get similar behavior for a WSGI Django application? (again, the intended setup is my ssh session on the server - virtual machine or remote)

+4
source share
1 answer

As far as I know, if you want to use pdb with an arbitrary wsgi application, it is best to use rpdb2 .

(for Django on mod_wsgi using apache you can refer to this guide: http://code.google.com/p/modwsgi/wiki/DebuggingTechniques )

+5
source

Source: https://habr.com/ru/post/1443401/


All Articles