Here some syntax related articles I found helpful while still working with TCL/expect scripts in networking environments.
The 1-st method to debug a expect scripts is done by setting exp_internal 1 in the script itself
exp_internal 1
The 2-nd debug method is adding -d command line option for executing the script
expect -d script.exp
Commenting out a passage in a expect script works like that:
set COMMENTED_OUT {
commented out stuff
}
or
proc COMMENTED_OUT {} {
commented out stuff...
}
tag