TurboGears standard error handler WebError doesn't work well with mod_wsgi processes. sfpy has custom error catching middleware and error template to display a trace in the web browser. We should use that in Allura also. And potentially enable the WebError or wdb in Allura when it's run with paster, since that's an even better debugger.
Remove
processesfromWSGIDaemonProcessdirective (can't even be set to 1).werkzeug
Comment out our
tg.error.ErrorHandlermiddleware and putapp = DebuggedApplication(app, evalex=True, console_path='/nf/__console__')afterStatusCodeRedirect. Works well, but less is logged to stderr logs (no env vars) and c.app/project/user don't work in interactive debugging.Still works with multiprocess, including limited interactive debugging (but doesn't work completely)
weberror
set debug=true in
inifileRequires hacks to modify
/_debugURL to be/nf/_debugwhich is needed for our sandbox environment. c.app/project/user does still work.SSLMiddlewareinterferes withErrorHandler. PuttingErrorHandlerafter it works, but then we'd miss some errors.I've forked WebError at https://github.com/brondsem/weberror to support /nf/_debug instead of /_debug but decided not to use that, since it's only needed for the SF sandbox environment and we can modify our routing.
sfpy:db/6093 - test with debug=false and ensure that /projects/ccaproj05/files/ shows a PFS error as flash message (that's the
safe_message_from_exceptionfunctionality that we still keep around)