How to debug fastcgi application?

How to debug FastCGI application? I have an application that is dying, but I cannot understand why, although it probably throws the stack trace to stderr. Running from the command line results in an error:

RuntimeError: No FastCGI Environment: 88 - Socket operation on non-socket

How to set up a "FastCGI environment" for debugging purposes? This is not my application - this is a third-party open source application, so I would rather not add to the heap of the log to find out what is going wrong.

If it matters, the Python application, but FastCGI is FastCGI, right? Is there a pad or something that allows you to call the fastcgi program from the command line and connect it to the terminal so you can see its stdout / stderr?

+3
source share
1 answer

It doesn't matter that the application is Python; your question is really "how to debug Python when I don't run the script myself."

You want to use a remote debugger. Great WinPDB has some documentation on built-in debugging that you can use to connect to your FastCGI application and go through it.

+2
source

Source: https://habr.com/ru/post/1709148/


All Articles