261 add debug tools
Closes issues0#261
What does this MR do?
Adds 2 debug tools into the project:
whoops
https://filp.github.io/whoops/
this is enabled in development only and shows nice error messages instead of a white screen in the case of an error
It looks like this
debugbar
this is adds a nice console view on the bottom which shows you the SQL queries that are run for that page (and other things). Currently it's enabled in all environments.
The idea for debugbar is we provide a flag for the user, so only users who should be able to use it can. I don't know which mechanism would be best for storing this information.
It will show you a view like this:
How confident are you it won't break things if deployed?
Whoops is only enabled for development so all should be fine.
Once we implement user flags, as long as debugbar is not called, it will not render anything, so should be good.
Links to related issues
https://gitlab.com/foodsharing-dev/issues0/issues/261 !137 (closed) (I cherry picked the commit out of this...)
TODO
-
decide how to enable/disable debugbar for different users (just enable for dev mode only for now)
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes, erm well I did cherry-pick !137 (closed) into here... will you forgive me? -
asked someone for a code review -
joined #foodsharing-beta channel at https://slackin.yunity.org -
added an entry to CHANGELOG.md (description, merge request link, username(s))