Reputation: 43067
How does one debug a FastCGI application? I've got an app that's dying but I can't figure out why, even though it's likely throwing a stack trace on stderr. Running it from the commandline results in an error saying:
RuntimeError: No FastCGI Environment: 88 - Socket operation on non-socket
How do I set up a 'FastCGI Environtment' for debugging purposes? It's not my app - it's a 3rd party open source app - so I'd rather avoid adding in a bunch of logging to figure out what's going wrong.
If it matters, the app is Python, but FastCGI is FastCGI, right? Is there a shim or something to let you invoke a fastcgi program from the commandline and hook it up to the terminal so you can see its stdout/stderr?
Upvotes: 3
Views: 1473
Reputation: 31880
It does matter that the application is Python; your question is really "how do I debug Python when I'm not starting the script myself".
You want to use a remote debugger. The excellent WinPDB has some documentation on embedded debugging which you should be able to use to attach to your FastCGI application and step through it.
Upvotes: 2