The Bash Debugger Project is a source-code debugger for bash that follows the gdb command syntax.
There are plugins available for VSCode and JetBrains.
Also, there are POSIX shell debuggers for Zsh and the Korn Shell.
Slightly related, there is cool debugger embedded im my fork of GNU Make.