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

Update default debug behaviour #976

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

thomasp85
Copy link
Collaborator

Fix #962

As discussed in the issue, this PR changes the default behaviour of debugging to no longer be contingent on whether plumber is running interactively or not. It will now always be false if not set (either in $run() or with pr_set_debug()), but will give a message (once per session) if using the default (FALSE) and running interactively()

@@ -267,6 +266,14 @@ Plumber <- R6Class(
on.exit(unmount_docs(self, docs_info), add = TRUE)
}

if (!isTRUE(quiet) && inform_debug && rlang::is_interactive()) {
rlang::inform(
"Error reporting has been turned off by default. See `pr_set_debug()` for more details.\nTo disable this message, set a debug value.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you

@schloerke schloerke merged commit 2ed0ee5 into main Jan 27, 2025
12 checks passed
@schloerke schloerke deleted the issue962-falsy-debug-default branch January 27, 2025 20:39
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.

enh: Change the default value of debug to a FALSE-like sentinel value
2 participants