Debugging Scripts in the C Shell

It is possible to debug a script by adding the -x flag to the shell executable:

% csh -x scriptname arguments

The action of the csh, csh, can be modified with command line parameters:

Option, Effect

-x
Commands are echoed prior to execution
-X
Same as above, but includes .cshrc commands
-v
Commands are echoed after history substitution
-V
Same as above, but includes .cshrc commands