A new guide has been published: How to debug a bash script?
Linux Hint shows you how to debug a bash script.Read more @ Linux Compatible