App stuck on loading: How to get more debug information?

As a Dash app grows, it is quite easy to make a coding mistake by which the elements and callbacks are somehow “incorrectly wired”. This sometimes has the effect that the app is stuck on loading.

In this situation you get no error message at all by default. At least if you have suppressed callback exceptions:

app.config['suppress_callback_exceptions'] = True

However, suppressing callback exceptions needs to be on for having callbacks on elements that are generated programmatically. And this - and correct me if you see that differently - is a prerequisite for organizing your code and keeping it maintainable when the app is more than a simple dashboard.

So without error messages, if you do not know what has gone wrong, your option is trial and error debugging. You also have no way of distinguishing a coding error from a possible bug in Dash.

Is it possible to switch on some verbose mode in which Dash actually complains about these kind of errors? The lack of feedback is by far my biggest doubt in the question whether you can build complex web applications with Dash, not just simple dashboards. Improving the debugging experience would give the largest productivity boost. What are the options here?

2 Likes