So here I have a simple function that I wish to debug. However, I am unable to debug the desired function even with set -o functrace enabled. Before resorting to asking this question, I had managed to find a possible solution that did not produce the desired results, which is located here.
How can I get bash debug my functions?
So here I have a simple function that I wish to debug. However, I am unable to debug the desired function even with set -o functrace enabled. Before resorting to asking this question, I had managed to find a possible solution that did not produce the desired results, which is located here.
How can I get bash debug my functions?
#!/bin/bash
echo "Hello World"
hello() {
echo "Hello world"
}
output:
user@mac11:53:29~/desktop bash -x debug.sh
+ echo 'Hello World'
Hello World
user@mac11:54:55~/desktop