0
GNU bash, version 4.3.42(2)-release-(i686-pc-msys)
Usage:  bash [GNU long option] [option] ...
        bash [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile

I notice there are two options for debug of my bash script. since I'm new to bash, I really want a debugger or things like that.

I have searched official document about bash 4.3, but I still don't know what the "--debug" long option suppose to do.

  • @User112638726 yes. just bash --debug, and do sth. and all is as usually – lovespring Jan 11 '16 at 15:21
1

Looking at the source code, --debug sets a debugging flag (in shell.c), but I can't find anywhere that flag is used. So it appears to not do anything.

--debugger activates support features for the bash debugger; the latter is probably what you're looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.