bashdb

A debugger for Bash shell scripts with breakpoints and stepping

brewmacoslinux
Try with needOr install directly
Source

About

Bash shell debugger

Commands

bashdb

Examples

Debug a Bash script with interactive breakpoints$ bashdb script.sh
Debug a script with command-line arguments$ bashdb script.sh arg1 arg2
Set a breakpoint at a specific line and debug$ bashdb -x script.sh