In general you can follow Laravel best practices to work with the back-end of Flarum.
When an issue happen you usually have plenty of backtrace details in the log file or directly on the page if you enabled debug.
When hunting bugs, dd()
is often your best friend ?
For front-end you can do a lot with the browser dev tools.