TixDebug Introduction

General

TixDebug uses the send command to instrument running code in a Tk or Tkinter application. Currently it can only instrument proedures, though instrumenting commands is possible, and would be usefull for catching Tkinter callbacks.

TixDebug is solely based on Tcl/Tk, there is no C-code, which makes it very easy to install. It works by parsing and redefining Tcl/Tk-procs, inserting calls to `td_eval' at certain points, which takes care of the display, stepping, breakpoints, variables etc.

The advantages are that TixDebug knows which statement in what proc is currently being executed and can give visual feedback by highlighting it. All currently accessible variables and their values are displayed as well. Code can be evaluated in the context of the current proc. Breakpoints can be set and deleted with the mouse.

Unfortunately there are back-draws to this approach. Preparation of large procs is slow and due to Tcl's dynamic nature there is no guarantee, that a proc can be prepared at all.

This problem has been alleviated somewhat with the introduction of partial preparation of procs. There is still no possibility to get at code running in global context, but I'm not sure if that would be useful anyway.

Interface

There are two parts to TDebug:

The Chooser
the TDebug frontend provides a window that talks to other Tk-based applications via `send'. To debug a running application, the Chooser sends a `source TixdDebug.tcl' command to the target, making the debugger available. You can then choose procs to prepare for debugging.
The Debugger
For further information, select a topic from the list below: