Up: GEOS SDK TechDocs | Up | Prev: dbrk ... | Next: delassoc ...

debug

debug <proc-name>*

Examples:

"debug"
Enter the Tcl debugger immediately.
"debug fooproc"
Enter the Tcl debuffer when the interpreter is about to execute the command "fooproc".

This command is used when debugging Tcl commands. It sets a breakpoint at the start of any Tcl command. Also serves as a breakpoint in the middle of a Tcl procedure, if executed with no argument.

See Also: undebug.

debugger

var debugger [<command-name>]

Name of the command when things go wrong. The function is passed two arguments: a condition and the current result string from the interpreter. The condition is "enter" if entering a command whose debug flag is set, "exit" if returning from a frame whose debug flag is set, "error" if an error occurred and the "debugOnError" variable is non-zero, "quit" if quit (^ is typed and the "debugOnReset" variable is non-zero, or "other" for some other cause (e.g. "debug" being invoked from within a function).

debugOnError

var debugOnError [(0|1)]

Examples:

"var debugOnError 1"
Turn on debugging when there's a Tcl error.

Enter debug mode when Swat encounters a Tcl error.

See Also: debugger.

defcmd

defcmd <name> <args> <help-class> <help-string> <body>

Examples: Look at almost any .tcl file in the system library for an example; a complete example set would be too large to give here.

This creates a new Tcl procedure with on-line help whose name the user may abbreviate when invoking.

See Also: defcommand, proc, help.

defcommand

defcommand <name> <args> <help-class> <help-string> <body>

Examples: Look at almost any .tcl file in the system library for an example.

This creates a new Tcl procedure with on-line help whose name must be given exactly when the user wishes to invoke it.

<help-class> is a Tcl list of places in which to store the <help-string>, with the levels in the help tree separated by periods. The leaf node for each path is added by this command and is <name>, so a command "foo" with the <help-class> "prog.tcl" would have its <help-string> stored as "prog.tcl.foo."

See Also: defcmd, proc, help.

defhelp

defhelp <topic> <help-class> <help-string>

Examples:

"defhelp breakpoint top {Commands relating to the setting of breakpoints}"
Sets the help for "breakpoint" in the "top" category to the given string.

This is used to define the help string for an internal node of the help tree (a node that is used in the path for some other real topic, such as a command or a variable).

See Also: help.

defvar

defvar <name> <value> [<help-class> <help-string>]

Examples:

"defvar printRegions 0"
Define "printRegions" as a global variable and give it the value zero, if it didn't have a value already.

This command is used in .tcl files to define a global variable and give it an initial value, should the variable not have been defined before.

See Also: var, help.


Up: GEOS SDK TechDocs | Up | Prev: dbrk ... | Next: delassoc ...