Hi,
on the overview,if your a naive user ,then the easiest way is to use
bash -xv <your script>
Assuming your using bash as your shell....
This will print the output line by line and will also include every statement with the corresponding actions,attributes and parameters you've passed!!!
It will list out each arg as and when they are called in the script ,so that it will be easier to debug...
Regards
PS:if your script is lengthy,be ready to scroll pages at a time, helpful nevertheless