Print error messages to terminal

Someone introduced a bug in a multi-page dash app. The bug renders a page unviewable. The process is:

  1. on page 1, click a link to page 2
  2. page 2 errors out
  3. dash redirects to page 1

Step 2 → 3 happens so fast that I can’t see the error message in the in-browser debugger before the app redirects to the viewable page. How do I print the in-browser error messages to the terminal?

If you disable debug mode, error messages should be redirected to the terminal.

After disabling debug mode I see HTTP GET/POST calls in the terminal. I do not see tracebacks from callbacks.