Skip to content

Commit

Permalink
use debugger variable to enable only debugger without debug mode enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Feb 1, 2025
1 parent 21f4d79 commit 5f54a9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion authentik/lib/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def start_debug_server(**kwargs) -> bool:

Check warning on line 8 in authentik/lib/debug.py

View check run for this annotation

Codecov / codecov/patch

authentik/lib/debug.py#L8

Added line #L8 was not covered by tests
"""Attempt to start a debugpy server in the current process.
Returns true if the server was started successfully, otherwise false"""
if not CONFIG.get_bool("debug"):
if not CONFIG.get_bool("debug") and not CONFIG.get_bool("debugger"):
return
try:
import debugpy
Expand Down
1 change: 1 addition & 0 deletions authentik/lib/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ cache:
# transport_options: ""

debug: false
debugger: false

log_level: info

Expand Down
2 changes: 1 addition & 1 deletion lifecycle/ak
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function prepare_debug {
chown authentik:authentik /unittest.xml
}

if [[ "$(python -m authentik.lib.config debug 2> /dev/null)" == "True" ]]; then
if [[ "$(python -m authentik.lib.config debugger 2> /dev/null)" == "True" ]]; then
prepare_debug
fi

Expand Down

0 comments on commit 5f54a9a

Please sign in to comment.