Why can't I get a stack trace from Foswiki after a failure when using FastCGI?

Essentially, it just doesn't work. Carp, and its CGI wrapper CGI::Carp, even with fatalsToBrowser - which is imported when you use FOSWIKI_ASSERTS=1 in your ENV, Eg. via bin/LocalLib.cfg - is unable to emit the stack trace to the web browser or server logs because of the way that FCGI works (see the stackoverflow link for details).

You will need to configure an alternate non-FastCGI path to your Foswiki installation; for example, foswiki.org (sometimes) has scripts & topics available via both FastCGI Eg. foswiki.org/Sandbox/Foo and also foswiki.org/cgi/view/Sandbox/Foo (non-fcgi).