OpenExtensions for z/VM "Q"s and "A"s

Question: Is there a way to see the instructions execute as you debug a shell script?

Answer:

If you want to debug a shell script and see the instructions as they are executed (similar to ksh -v), run the script with this command:

sh -x shellscript_name

However, this does not turn on execution tracing for nested shell scripts. There are lots of books written about the shell and shell script debugging; look in your favorite bookstore.


For more questions and answers, go to our archive of questions and answers.