It seems to work somewhat when I just execute:
python manage.py runserver <hostname>:<port> --pdb
.
What happens is it will receive the GET
request, but it won't actually let me step through the code, the output being something along the lines of:
[07/Aug/2012 18:27:12] code 400, message Bad request syntax ('\x01\x01\x00\x01\x00\x08\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x01\x04\x00\x01\x02^\x02\x00\t\x11PATH_INFO/app/0/test/\x0e\x03REQUEST_METHODGET\x0c\x00CONTENT_TYPE\x0
e\x00CONTENT_LENGTH\x0c\x00QUERY_STRING\t\rHTTP_HOSTxx.xxx.xxx.xx\x0f')
HTTP_HOSTxx.xxx.xxx.xx" 400 -^ PATH_INFO/app/0/test/REQUEST_METHODGETCONTENT_TYPECONTENT_LENGTHQUERY_STRING
[07/Aug/2012 18:27:12] code 400, message Bad request syntax ('\x01\x01\x00\x01\x00\x08\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x01\x04\x00\x01\x02\x00\x00\x00\t\x0cPATH_INFO/favicon.ico\x0e\x03REQUEST_METHODGET\x0c\x00CONTENT_TYPE\x0e\
x00CONTENT_LENGTH\x0c\x00QUERY_STRING\t\rHTTP_HOSTxx.xxx.xxx.xx\x0f')
HTTP_HOSTxx.xxx.xxx.xx" 400 -
As I'm sure you can imagine, when debugging that doesn't really say much (at least, for someone with my knowledge level).
Still, since I'm running nginx on the development server (which is not localhost), I'd like to be able somehow do:
python manage.py runfcgi host=<hostname> port=<port> --settings=myproject.settings --pdb #<--this flag fails
I.e., that command with the --pdb
invocation flag, which will go to shell as soon as I send a get request to the page I want to debug through the browser.
So, is this possible?
Try rpdb, remote debugger based on pdb.