views:

279

answers:

1

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?

+1  A: 

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.

Glyph