This is the README for an extension to Don Libes' Tcl debugger. This extension consists primarily of an interactor that can be used with Tk. This interactor allows connecting to an already running Tk program, even one that is running in the background. This interactor requires the use of Tk. ================================================================ HOW TO BUILD IT First, build Don Libes' Tcl debugger. It is in the tcl-debug-1.0 subdirectory. I have not automated its build yet. Then, read the file INSTALL. It should explain everything necessary to build this package. If Tcl and Tk are not found, then the configure step will fail. ================================================================ HOW TO USE IT Call "Dbg_InitTk(interp)" at some point in your initialization. This will set up a socket for communication, and will call Dbg_Init for you. You must link your program against the "tkdbg" and "tcldbg" libraries, in addition to libtk, libtcl, etc. You can use the "tcld" program to connect to a Tk process that has initialized the debugger. Usage is "tcld pid". Read Libes' paper for details on how the debugger actually works. ================================================================ SECURITY ISSUES Obviously, allowing socket connections to your running Tcl program brings up some serious security considerations. This package sidesteps these by only creating Unix-domain sockets. These sockets are placed in a restricted subdirectory. The result is that only you can connect to processes running under your uid. ================================================================ KNOWN PROBLEMS / TO DO wish doesn't destroy the Tcl interpreter when it is finished, so the temp directory never gets cleaned up. I don't have a particularly good fix for this right now. There is a program that cleans up the temp directory, but it should be merged with tcld. tcld should have an option to print which processes are available. This could easily be added to "tcld-clean", but I haven't felt like it. There should be a texinfo page for the debugger.