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

Added /debug-env command #3727

Merged
merged 3 commits into from
May 13, 2022
Merged

Added /debug-env command #3727

merged 3 commits into from
May 13, 2022

Conversation

zneix
Copy link
Collaborator

@zneix zneix commented May 13, 2022

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Purely for debugging-related addition, similar to /debug-args.
This prints multiple messages, showing values of Env::instance's members. I wanted to make it print one message with values separated / joined by a newline, but that didn't work, so I decided to just print multiple messages.

Example:
output of /debug-args command

Since this is debug information with placeholder values, messages printed by /debug-env don't parse links.

P.S. I don't really like this code but I decided to push this anyway. Maybe someone has a better idea on how to make this.

This prints multiple messages, showing values of Env::instance's members.
Since this is debug information with placeholder values, messages printed by /debug-env don't parse links.
To achieve that, a boolean parameter was added to `makeSystemMessage` which passes it further to the system message variant of `MessageBuilder`.
Copy link
Collaborator

@Mm2PL Mm2PL left a comment

Choose a reason for hiding this comment

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

Useful for debugging unexpected behavior of the environment. Can for example check if custom rm host works :) One flaw of this kind of command is that it needs to be updated when chatterino::Env is updated, but I don't think it's that bad and won't cause much issues even if not tended to.

@Mm2PL Mm2PL merged commit 5ba3ef7 into master May 13, 2022
@Mm2PL Mm2PL deleted the zneix/feature/debug-env branch May 13, 2022 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants