Tutorial
Komodo can be used to debug Tcl programs locally or remotely. The following instructions describe how to configure Tcl debugging. For general information about using the Komodo debugger, see Komodo Debugger Functions.
Debugger commands can be accessed from the Debug menu, by shortcut keys, or from the Debug Toolbar. For a summary of debugger commands, see the Debugger Command List.
Specify the Tcl interpreter Komodo uses to debug and run Tcl programs:
PATH
and lists all tclsh
and wish
interpreters available in separate drop-down lists. If no Tcl
interpreters are displayed in the list, check that the location
of the interpreters is specified in your PATH
environment variable.Note: Tcl Beta releases contain only
version-specific executables (e.g. tclsh85.exe
and
wish85.exe
). Komodo does not automatically find
these in the path. To use them, specify them manually in the
Interpreters section of the Tcl language preferences rather
than selecting Find on Path.
To start a local Tcl debugging session, click Go/Continue or Step In on the Debugger menu or toolbar. See Komodo Debugger Functions for full instructions on using Komodo's debugging functionality.
When debugging a Tcl program remotely, the program is executed on the remote machine and the debug output is sent to Komodo. Komodo controls the debugging session (e.g. stepping, breakpoints, and spawnpoints) once the session has been started on the remote machine.
To debug a Tcl program remotely, the Tcl debugger application, dbgp_tcldebug.exe (Windows) or dbgp_tcldebug (Linux and OS X), must be installed on the remote machine. This file is installed in the tcl subdirectory of the Komodo installation directory for your platform.
Windows
<komodo-install-directory>\lib\support\tcl
Linux
<komodo-install-directory>/lib/support/tcl
Mac OS X
<komodo-install-directory>/Contents/SharedSupport/tcl
This application is also available for download from the Komodo Remote Debugging page.
To install the Tcl debugger application on the remote machine:
To debug a Tcl script on a remote machine:
dbgp_tcldebug -dbgp <komodo_host:port> -app-file <tcl_program> -app-shell </path/to/tclsh_or_wish>
The following options are available:
... -app-file
test.tcl -- arg_0 arg_1
).tclsh
or wish
).Example
Remote Machine (Windows):
C:\remote_debug
directory.test.tcl
and is located in the current working directory.C:\Tcl\bin\wish.exe
.Local Machine:
In this scenario, the following command is entered on the remote machine:
C:\remote_debug\dbgp_tcldebug.exe -dbgp mybox:9000 -app-file test.tcl -app-shell C:\Tcl\bin\wish.exe