How to debug a tcl script which is argument to an executable?
I have a application which takes tcl script as argument. I want to debug tcl script when the application processes it.
My development environment consists of Dynamic Languages Toolkit along with Active state remote debugger -dbgp_tcldebug. I am able to debug the individual tcl scripts with this setup.
I created a tcl project in eclipse and added 'startup.tcl
' and 'argumentScript.tcl
' scripts and added following command to the startup scrip开发者_运维问答t,
set ExecutableName "xyz.exe"
set returnValue [catch {eval exec $ExecutableName "argumentScript.tcl" } result]
My debugger works fine with 'startup.tcl
' script. I added the breakpoint in 'argumentScript.tcl
' but it is not working. How can I debug the "argumentScript.tcl
" script ?
Edit: A solution without using eclipse environment is Tcl Dev Kit with remote debugging feature.
you could use tcls introspective abilities to have the script debug itself e.g. using trace
puts f "debug message" is our all! Just dump all that you need in log file. Simple, Stupid and Robust :)
精彩评论