Core: Re-add debug button in AJAX errors

Created on 7 Dec 2018  路  7Comments  路  Source: flarum/core

Removed in https://github.com/flarum/core/commit/64686ef7a97a17dccd70fd9eb99240ab97d5ef45 for Beta 8.

However, this is a much easier method of debugging for support requests, and does not force users to learn a new UI (web/dev tools in browser) or parse which errors in log files are relevant immediately.

I suggest restoring it for future versions.

Good first issue typfeature

Most helpful comment

We discussed this and decided to also add the error message to the console output, to have them persisted when the modal is gone.

All 7 comments

We discussed this and decided to also add the error message to the console output, to have them persisted when the modal is gone.

I've always used that button to see my var_dump's , but now there's no way to see it. Althought It did show plain html code, maybe let it support html too? Or there could be another way possibly.

@MichaelBelgium Instead of using var_dump, use Flarum's logger with app('log'). You can emit debug messages with app('log')->debug(...), info with app('log')->info(...), etc...
You can find those log files in storage/logs

@datitisev ooh great didn't know about that!

maybe promote issues like these on a dev diary: https://discuss.flarum.org/d/20605-dev-diary-beta-10

Is this on the beta10 roadmap? I had to manually add the debug button back and would also like to see this feature return. Also curious as to why it was removed in the first place.

It is currently targeted for beta10, but might not make the cut. Unless somebody sends a PR. :wink:

As for why it was removed, the commit says:

Using the browser's console to debug failed requests is much more powerful

That's definitely true, but probably quite overwhelming for non-technical users.

Was this page helpful?
0 / 5 - 0 ratings