Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django - use pdb interactive debug for wsgi running app

If I develop a Django app and use the included testing server, I can just add a import pdb; pdb.set_trace() anywhere in the code and have a breaking point that throws me into an interactive debugger. To make things clear, I dont' mean using any IDE, just simple setup of ssh-ing into a VM or remote dev server.

How can I get a similar behavior for an WSGI Django app? (again, the assumed setup is me with an ssh session to the server - VM or remote)

like image 709
NeuronQ Avatar asked Nov 01 '12 09:11

NeuronQ


1 Answers

To the best my knowledge, if you want to use pdb with arbitrary a wsgi app, your best bet is to use rpdb2.

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

like image 128
K Z Avatar answered Nov 19 '22 20:11

K Z