Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running tcl script from command line

Status
Not open for further replies.

Hopeful22

MIS
Dec 27, 2001
11
US
Thanks for the guys on my previous question that i have posted. I have a short question this time.

In running regular shell scripts, i can type "sh -x ./(script_name) and can see the script execute all its steps.
Is there an equivalent for my tcl script so that I can execute it and see it go thru each line so I can debug my tcl script?

Thanks in adavance!
 
There isn't any such trace facility available as a command-line option to plain, ol' tclsh. If you're using the expect interpreter, there is:

[tt]expect -c 'strace N' script.tcl[/tt]

where N is the level which you want the trace dig into.

However, there are a variety of tools that you can use for tracing and debugging your Tcl scripts. Now that TclPro is freely available in open source, I highly recommend downloading and using it. It includes both an interactive debugger and a static code syntax checker. You can get it from the Tcl Developer Xchange,
There are many other debugging tools, aids, and tips documented on The Tcler's Wiki at the following page: - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top