UNDER CONSTRUCTION
1. Tcl Debugging
Weld is a true debugger of Tcl in the sense that it
dynamically intercepts calls to procs rather than
instrumenting code.
This means the debugger does not need to preprocess source files
and so can be used even with
embedded Tcl applications, ie. Tcl with C extensions.
Another distinctive feature of the Weld debugger is that it deals only with
code executed inside of procs.
Code outside of procs is considered infrastructure or glue code
and therefore ignored. This eliminates distracting extraneous
support code such as proc, namespace and variable calls.
The name
Weld is an acronym for Warning Enabled Lazy Debugger.
2. Usage
The debugger can be used when running programs from wted using
<Shift-F5> and selecting the Weld Debugging option
(see Screenshot).
3. Command-line
The simplest way to use weld for debugging from the command line
is to invoke it as wtdb, eg.
wtdb main.tcl
Similarly
compiled program may be debugged on systems
where gdb is available with:
wtdb a.out
which uses tdb as a frontend to gdb.
Weld may also be used to debug programs directly from the command line
by invoking it as:
weld -Wdebug=2 foo.tcl
4. Weld under DDD
In addition to wtdb other programs
may be act as the controlling interface or GUI, such as DDD or Emacs.
DDD may be used as the GUI interface using:
ddd --args weld -Wdebug=2 file.tcl arg1 arg2 ...
See emacs documentation on running gdb in a sub-shell.
5. Dual-level Debugging
It is also possible to debug both at the C (low) and Tcl (high) levels
simultaneously using somthing like:
wtdb ~/bin/weld -Wdebug=2 main.tcl
© 2008 Peter MacDonald