



I want to debug an existing expect script. It uses an expect interpreter,
How do I use the tcl dev kit for this?
I added the line package require Expect to then script, but it cannot find the package. I tried to set TCL_LIBRARY, TCLLIBRARY to the location where pkgIndex.tcl and libexpect.so are to no avail.
Please advise what to do.
You can specify 'expect' as the Tcl interpreter in the program preferences for debugging in the TDK and it should work. Alternatively, if you are using ActiveTcl, then the 'package require Expect' should be all that is necessary. If that is not working, double-check that you are invoking the ActiveTcl tclsh and not another variant.
When I specify the expect as the Tcl interpreter, I get an error popup saying that a connection error occurred.
I could not find tclsh in the TclDevKit installation tree. Where is it?
---------------
YS
I would recommend trying again by installing ActiveTcl, which is what provides tclsh and the Expect extension. This should be compatible with your script and is known to work.
I installed ActiveTcl and tried to use its tclsh as the interpreter for debugging. I am not sure what is going on, but when running the script under the debugger with package require Expect added, I see the very first statement in the script 'source $expect_library/test.exp' fail.
The error message is:
--------------------
couldn't read file "/auto/gsg-sw/inst/sparc-sun-solaris2.8/ActiveTcl-8.4.1.5.0/lib/expect5.44.1/test.exp": no such file or directory
while executing
"source $expect_library/test.exp"
----------------------------------------------
It look like the search path is incorrect.
How can I fix it?
The script runs OK with the original expect executable.
---------------
YS