Skip to content

Commit

Permalink
default to DEBUG mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamilcuk committed Dec 11, 2024
1 parent 400363a commit 34e2396
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/L_bash_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ def add(self, rr: Record):
}
PROFILEMETHODS.update(
{
"1": PROFILEMETHODS["XTRACE"],
"2": PROFILEMETHODS["DEBUG"],
"1": PROFILEMETHODS["DEBUG"],
"2": PROFILEMETHODS["XTRACE"],
"3": PROFILEMETHODS["VAR"],
}
)
Expand Down Expand Up @@ -899,15 +899,15 @@ class ProfileArgs:
)
method: str = clickdc.option(
"-m",
default="XTRACE",
default="1",
type=click.Choice(list(PROFILEMETHODS.keys()), case_sensitive=False),
help="""
Chooses the method to profile the script.
1 or XTRACE uses set -x with BASH_XTRACEFD and FD4 to output the commands.
2 or DEBUG uses trap DEBUG to output executed commands to a file.
1 or DEBUG uses trap DEBUG to output executed commands to a file.
2 or XTRACE uses set -x with BASH_XTRACEFD and FD4 to output the commands.
3 or VAR uses trap DEBUG to append commands to an array and then write it to a file on the end of execution.
XTRACE is the fastest.
DEBUG is the most reliable.
XTRACE is the fastest, but set -x prints after expansions have been done to the command.
VAR does not handle subshells.
""",
)
Expand Down

0 comments on commit 34e2396

Please sign in to comment.