Debugging Bash

From Zanecorpwiki

Jump to: navigation, search

You can run bash with the '-x' and '-v' to report commands as they are executed and input as it's read respectively.

To narrow your focus a bit, use 'set -x' and 'set -v' to enable and 'set +x' and 'set +v' to disable this behavior for specific sections of code.

You can also use 'trap'. TODO: flesh this out.

Personal tools