debug(3tcl) | debug narrative | debug(3tcl) |
debug - debug narrative - core
package require Tcl 8.5
package require debug ?1.0.6?
debug.tag message ?level?
debug 2array
debug define tag
debug header text
debug level tag ?level? ?fd?
debug names
debug off tag
debug on tag
debug parray arrayvarname
debug pdict dict
debug hexl data ?prefix?
debug nl
debug tab
debug prefix tag ?text?
debug setting (tag level) ... ?fd?
debug suffix tag ?text?
debug trailer text
Debugging areas of interest are represented by 'tags' which have independently settable levels of interest (an integer, higher is more detailed).
See methods level and setting for querying and manipulating the current level of detail for tags.
The actually printed text consists of not only the message, but also global and tag-specific prefix and suffix, should they exist, with each line in the message having the specified headers and trailers.
All these parts are substableTcl scripts, which are substituted once per message before assembly.
See also method settings below.
The result of the method is the empty string.
Note how this is tag-independent.
Further note that the header substitution happens only once per actual printed message, i.e. all lines of the same message will have the same actual heading text.
The result of the method is the specified text.
The result of the method is the new detail-level for the tag.
The result of the method is the empty string.
The result of the method is the empty string.
This makes it suitable for use in debug messages.
This makes it suitable for use in debug messages.
This makes it suitable for use in debug messages.
Each line of the dump is prefixed with prefix. This prefix defaults to the empty string.
In contrast to header the generated text is added to the user's message before it is split into lines, making it a per-message extension.
Furthermore the script is tag-dependent.
In exception to that, a script for tag :: is applied to all messages.
If both global and tag-dependent prefix exist, both are applied, with the global prefix coming before the tag-dependent prefix.
Note that the prefix substitution happens only once per actual printed message.
The result of the method is the empty string.
If the tag was not known at the time of the call it is registered, and set inactive.
Each named tag is set to the detail-level following it, with a negative level deactivating the tag, and a positive level activating it.
If the last argument is not followed by a level it is not treated as tag name, but as the channel all the named tags should print their messages to.
The result of the method is the empty string.
In contrast to trailer the generated text is added to the user's message before it is split into lines, making it a per-message extension.
Furthermore the script is tag-dependent.
In exception to that, a script for tag :: is applied to all messages.
If both global and tag-dependent suffix exist, both are applied, with the global suffix coming after the tag-dependent suffix.
Note that the suffix substitution happens only once per actual printed message.
The result of the method is the empty string.
If the tag was not known at the time of the call it is registered, and set inactive.
Note how this is tag-independent.
Further note that the trailer substitution happens only once per actual printed message, i.e. all lines of the same message will have the same actual trailing text.
The result of the method is the specified text.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category debug of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.
debug, log, narrative, trace
debugging, tracing, and logging
Copyright (c) 200?, Colin McCormack, Wub Server Utilities Copyright (c) 2012-2014, Andreas Kupries <andreas_kupries@users.sourceforge.net>
1.0.6 | tcllib |