Note: it is important to use a debugger-enabled bash. You will get an error message if the debugger is run under a version of BASH that does not have debugging support.
As mentioned above, one can enter the BASH debugger via Emacs or DDD. However you don’t have to use either of these. And these still need a way on their own to get things started.
There are in fact two other ways to start the BASH debugger. The
first way is to pass the ‘--debugger’ option to bash with the
name of your script the scripts arguments following that, or with a
command string (-c
).