Bash with Debugger and Improved Debug Support and Error Handling

1 thunderbong 1 7/11/2025, 10:54:29 AM bashdb.sourceforge.net ↗

Comments (1)

westurner · 21h ago
There are libraries for unit testing shell scripts.

And also,

From https://news.ycombinator.com/item?id=26906351 :

> From "Bash Error Handling" https://news.ycombinator.com/item?id=24745833 : you can display the line number in `set -x` output by setting $PS4:

  export PS4='+(${BASH_SOURCE}:${LINENO}) '
  set -x
And

    trap '(read -p "[$BASH_SOURCE:$LINENO] $BASH_COMMAND?")' DEBUG