如何调试 Expect_before 行为
我对 TCL/expect 比较陌生,主要修改现有代码。expect_before
似乎没有达到我的预期(这很好),但我不知道如何调试它。 我已经使用了 -d
选项,现在用于
exp_internal -f "argh.log" 1
创建日志文件,但它对我没有帮助。
expect_before -info
似乎很有用,但我无法抓取/显示输出(我确实说过我是 TCL 的新手)
I am relatively new to TCL / expect and mostly modifying existing code.expect_before
doesn't seem to do what I expect (which is fine) but I can't work out how to debug it.
I have used -d
option and am now using
exp_internal -f "argh.log" 1
to create a log file, but it isn't helping me.
expect_before -info
seems useful, but I am not able to grab / display the output (I did say I was new to TCL)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
函数结果可以通过使用
set
来获取当前配置。
使用exp_internal对于查看表达式的计算方式也很有用,一旦您理解了输出 - 当您的expect_before尚未按预期设置时,它应该是显而易见的。
Function results can be grabbed in expect by the use of
set
will grab the current configuration.
Using
exp_internal
is also useful to see how expressions are evaluated, and once you understand the output - it should be obvious when your expect_before has not been set up as expected.