views:

474

answers:

7

I like a bit of TiVo hacking in spare time - TiVo uses a Linux variant and TCL. I'd like to write TCL scripts on my Windows laptop, test them and then FTP them over to my TiVo.

Can I have a recommendation for a TCL debugging environment for Windows, please?

+1  A: 

Building Tcl/Tk with Mingw

dpp
+3  A: 

Komodo from Activestate is a good IDE for Windows/Linux. There is a trial version - I am not sure if there is a free version after trial though.

Abhinav
Komodo is a nice IDE for Mac/Linux/Win. Works great with Tcl. I've been using it for a few years now.
daustin777
A: 

http://www.tcl.tk/software/tclpro/eval/

+1  A: 

I'm not sure that you need a debugging environment as such. Just grab the binary release from ActiveState (http://www.activestate.com/Products/activetcl/index.mhtml) and run your scripts from the command prompt (C:/blahblah/tclsh myprog.tcl) and see what it spits out.

I'd advise against building it from source because it doesn't really gain you anything.

Toby
printf (er, puts) debugging is no substitute for a good debugger.
Dana Robinson
A debugger is no substitute for good unit testing.
RHSeeger
A: 

ActiveState has a Tcl development kit (not free, but cheap) that I've used in the past. It even worked with our embedded tcl interpreter.

http://www.activestate.com/tcl_dev_kit/

Dana Robinson
A: 

I've found this breakpoint setter from the Tcl wiki (from Richard Suchenwirth) to be handy. Once the interpreter sees a call to this, say "bp beforehairyfunction", it pauses and gives you a tclsh prompt.

proc bp {{s {}}} {
        if ![info exists ::bp_skip] {
           set ::bp_skip [list]
        } elseif {[lsearch -exact $::bp_skip $s]>=0} return
    if [catch {info level -1} who] {set who ::}
    while 1 {
     puts -nonewline "$who/$s> "; flush stdout
     gets stdin line
     if {$line=="c"} {puts "continuing.."; break}
     if {$line=="i"} {set line "info locals"}
     catch {uplevel 1 $line} res
     puts $res
    }
 }
ctd
A: 

This wiki page discusses tools for developing and debugging in Tcl. In particular, I've been enamoured with tkinspect (mentioned on that wiki page with its own page elsewhere on the wiki) which allows one in a linux or other unix x environment to interact with a running tk application to attempt to do some debugging. Of course, ActiveState's commercial product "tcl dev kit" has a debugger. There are other debuggers - free and not so free - discussed on the wiki as well.

lvirden