Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My lab uses csh scripts to run jobs. It is usually difficult for me to debug a shell script, so I'm wondering if there is a csh debugger I can use.

I know there are some flags like -x or -v that can help, but because the script is kind of long, it would be better if I can set breakpoints on it. As I searched online, I found there is a debugger specifically for bash scripts that supports breakpoints, but I couldn't find one for csh scripts. Will the bash debugger work? Is there a csh-specific debugger I can use?

share|improve this question
Doesn't csh -x yourScript.sh cut it? – Bobby Oct 8 '12 at 21:37
I dont think "shell" has debugger, just echo the values out or use -x – warl0ck Oct 9 '12 at 6:28

This page lists two useful csh switches: -v to show each command before variables are substituted, and -x to show them afterwards.

share|improve this answer
Welcome to Unix and Linux! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Renan Oct 8 '12 at 22:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.