I am facing a problem related to expect debug command.
I'm using debug command in a script. If I execute the script directly
using expect, it halts at the debug command and works as expected.
tcl commands properly execute at the debug prompt.
However, I've an application (a test management execution engine
written in TCL) that invokes this script. The script halts at the
desired point. I can use all tcl commands at the debug mode. However,
if I try to set a variable to a multiline value, the interpreter
Setting a multiline variable works perfectly fine from the simple
expect mode (not using the execution engine). So, I guess the issue
has something to do with the execution engine but am not sure what it
One visible difference that I noticed while using the execution
engine is that the commands in the debug mode are echoed back:
dbg17.0> file channels
stdin serial1 serial2 exp0 sock5 sock6 exp2 file8 exp4 file11
dbg17.1> set a 10
set a 10
dbg17.2> set b "10\
set b "10\
<<--------------- Hange here
This does not happen in case of simple expect mode:
dbg1.1> file channels
exp3 stdin exp0 stdout stderr exp2
dbg1.2> set a 10
dbg1.3> set b "10\
I do not have much idea about the execution engine but I know for
that it plays with stdout/stderr to redirect output to either /dev/
null or to some files. I'm totally clueless as to how to approach
Is there a way I can configure stdout/stderr channels in the debug
mode to disable echoing back of commands or determine which channels/
files have they been redirected to or any other ways to debug this
Any inputs/clues to approach this problem will be highly appreciated.
Thanks in advance