How do I debug a tcl script that is an argument to an executable?

I have an application that takes a tcl script as an argument. I want to debug a tcl script when the application is processing it.

My development environment consists of a set of dynamic languages along with Active state remote debugger -dbgp_tcldebug . I can debug individual tcl scripts with this setting.

I created a tcl project in eclipse and added the scripts " startup.tcl

" and " argumentScript.tcl

" and added the following command to run the script,

set ExecutableName "xyz.exe"

set returnValue [catch {eval exec $ExecutableName "argumentScript.tcl" } result]

      

My debugger works fine with startup.tcl

'script. I added a breakpoint at ' argumentScript.tcl

' but it doesn't work. How can I debug a argumentScript.tcl

script?

Edit: A solution without using the eclipse Tcl Dev Kit framework with remote debugging functionality.

+2


a source to share


2 answers


you could use tcls introspective abilities to have a debug script yourself, for example. using trace



0


a source


puts f "debug message" is everything! Just dump whatever you need in the log file. Simple, stupid and reliable :)



0


a source







All Articles