|
|
|
|
|
by Newky
4586 days ago
|
|
You are right that this is not straight forward in Django. There are a number of different routes in Django development that you may need to debug: 1. Debugging view endpoints when not using runserver (for example when testing out your actual deploy webserver). For this, none the debuggers will work, as you have no console to run through. I combat this by using winpdb that allows remote debugging. 2. Debugging either unittest based code or when using runserver, you can use the method described by
hcarvalhoalves comment. However, I still think that in lots of cases its more powerful to import in the code. With the necessary coverage in tests, it should always be picked up. |
|
I wonder if you could also use it with runfcgi or any of the other manage commands? I personally use nginx+gunicorn, but for testing production I could switch it to runfcgi or similar really quick.
To be honest though, I don't find myself ever debugging production.