免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2718 | 回复: 2

TCL语言有免费的Debug工具吗? [复制链接]

论坛徽章:
0
发表于 2011-03-28 10:09 |显示全部楼层
哈哈,大家好,我现在开始学习TCL语言了,算是新手,还在书面上操练呢。

但是现在学习下来,遇到一点问题,就是不知道到什么地方去找到免费的TCL的Debug工具

也就是说用什么办法来看我写的脚本运行的情况,或者看各个变量的值啊?

各位前辈帮我看看,有免费的开发软件不?

哈哈,多谢阿!

论坛徽章:
0
发表于 2011-03-28 10:27 |显示全部楼层
你不是说你自己正在学吗?
man expect:
http://www.tcl.tk/man/expect5.31/expect.1.html

The -d flag enables some diagnostic output, which primarily reports internal activity of commands such as expect and interact. This flag has the same effect as "exp_internal 1" at the beginning of an Expect script, plus the version of Expect is printed. (The strace command is useful for tracing statements, and the trace command is useful for tracing variable assignments.) (When using Expectk, this option is specified as -diag.)

The -D flag enables an interactive debugger. An integer value should follow. The debugger will take control before the next Tcl procedure if the value is non-zero or if a ^C is pressed (or a breakpoint is hit, or other appropriate debugger command appears in the script). See the README file or SEE ALSO (below) for more information on the debugger. (When using Expectk, this option is specified as -Debug.)

debug [[-now] 0|1]
controls a Tcl debugger allowing you to step through statements, set breakpoints, etc.
With no arguments, a 1 is returned if the debugger is not running, otherwise a 0 is returned.

With a 1 argument, the debugger is started. With a 0 argument, the debugger is stopped. If a 1 argument is preceded by the -now flag, the debugger is started immediately (i.e., in the middle of the debug command itself). Otherwise, the debugger is started with the next Tcl statement.

The debug command does not change any traps. Compare this to starting Expect with the -D flag (see above).

See the README file or SEE ALSO (below) for more information on the debugger.

论坛徽章:
0
发表于 2011-03-28 13:41 |显示全部楼层
哇,谢谢xiaopan3322 阿,看来还是我学习的不够啊

原来TCL自己带有debug办法的,哈哈,我套用以前学习C的经验了,哈哈

还要好好学习,哈哈
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP