├── LICENSE ├── README.md └── bash-debug /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | Copyright (C) 2004 Sam Hocevar 4 | 14 rue de Plaisance, 75014 Paris, France 5 | Everyone is permitted to copy and distribute verbatim or modified 6 | copies of this license document, and changing it is allowed as long 7 | as the name is changed. 8 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 9 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 10 | 0. You just DO WHAT THE FUCK YOU WANT TO. 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | A simple debugger for bash. 2 | 3 | Each script command is printed before execution. Then command prompt appears (no autocompletion). Prompt includes the last command return value. You can print a command to execute in the script context or an empty line to continue. 4 | 5 | ```bash 6 | bash-debug script-to-debug.sh [script args] 7 | ``` 8 | 9 | Note: `set -o functrace` is used, changing DEBUG and RETURN traps inheritance for shell functions. 10 | -------------------------------------------------------------------------------- /bash-debug: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function _bash_debug_print_usage() { 4 | echo "Usage: $0