plotly / plotly/dash

Enable Terminal Error Logging Alongside Debug Mode

Open
#2,477 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Is your feature request related to a problem? Please describe.

When launching a dash app with debug=True like so:

 app.run_server(debug=True)

Any exceptions raised in the applications are no longer displayed in the terminal. Currently (by design) they are only displayed in the browser.

Describe the solution you'd like

I'd like to be able to both view stderr logs in the terminal and have the option to view the exception in the browser.

Why can't we have both?

Describe alternatives you've considered

I cannot find any other issues mentioning this, and I have tried for a while to find solutions until I read the docs and deduced that this "is a feature not a bug". I just think it's limiting for the developer experience; why not give developers the choice of whether they can enable/disable terminal logging while debug is True?

I found it quite unintuitive that to enable terminal logging I had to set debug to False. Took me a long time to figure that out - actually thanks to chat GPT lol.

Additional context

Quote from the dash docs: https://dash.plotly.com/devtools#in-app-error-reporting

In-App Error Reporting

Callback error messages and JavaScript error messages are displayed as a pop-up within your application instead of in your terminal. Our intention was to reduce the context switch during development between terminal, code editor, browser and browser debug console. With error messages in the app, you can just focus on your browser and your code editor.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the app.run_server(debug=True) behavior and the Dash devtools documentation section on in-app error reporting. Trace how callback exceptions are routed when debug mode is enabled, then determine how an independent terminal-logging option should interact with browser reporting. Done means both destinations can be enabled or disabled as described, with coverage for the supported combinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.