Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic debug logs #912

Merged
merged 1 commit into from
Nov 18, 2023
Merged

Add automatic debug logs #912

merged 1 commit into from
Nov 18, 2023

Conversation

xs5871
Copy link
Collaborator

@xs5871 xs5871 commented Nov 9, 2023

Automatically enable debug output if a serial monitor is connected to the serial interface.

@xs5871 xs5871 force-pushed the feature-autodebug branch from a46da29 to 9ef192c Compare November 9, 2023 11:07
Copy link
Member

@regicidalplutophage regicidalplutophage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cautiously approving this.
Since most people only learn about boot.py when something is not going well for them, I wonder if this doesn't affect performance too much.

@xs5871
Copy link
Collaborator Author

xs5871 commented Nov 14, 2023

Boot configuration doesn't really affect this. If the serial console is disabled, then of course no debug messages are processed. If, as by default, the serial endpoint is connected: if and only if a serial monitor is actually connected (picocom, screen, etc.) debug messages are enabled. They are disabled again once the monitor is properly disconnected/closed.
There's one stumbling block where a serial monitor can be closed without resetting the connection (in picocom that's ctrl-q vs. ctrl-x) -- but that'll only happen if debugging was enabled intentionally in the first place. That's a reasonable trade-off for the convenience in my opinion and shouldn't affect any casual users.
Does this explanation address your concerns? I'll wait with the merge for your feedback.

@regicidalplutophage
Copy link
Member

regicidalplutophage commented Nov 18, 2023

U-huh, I misunderstood it then.
All good, I don't have any issues with this 👍

@xs5871 xs5871 merged commit 108c59c into master Nov 18, 2023
3 checks passed
@xs5871 xs5871 deleted the feature-autodebug branch November 18, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants