Macro Language Reference > Macros > Debug > tagtrace
  
tagtrace
Description
Activates the tag trace facility, which logs all the PTC ALD text tags, and the streams from which they were read, in the order they were encountered during the formatting process, as part of the template debugging process.
Syntax
tagtrace *:L? main options:n? other parameters:s?
tagtrace
[no parameter]
Invokes the Tag Tracing - Current Document Settings dialog box.
*
Invokes the Tag Tracing - Global Setting dialog box.
main options
0
Off, unless overridden by the document preferences or <?tagtrace> PI
1
On, unless overridden by the document preferences or <?tagtrace> PI
2
Off, overrides the document preferences or <?tagtrace> PI
3
On, overrides the document preferences or <?tagtrace> PI
other parameters
Not currently documented.
Additional Information
Tag tracing can be active during one of the following PTC ALD operations:
tformat
trf
tprint
Logged from the formatter
The tagtrace log shows the order in which PTC ALD reads and formats tags. For instance, if a tag results in text flowing over a page break, the tag itself may be read more than once by the formatting engine and this in turn may cause other tags to be processed again. This will be reflected in the tag trace log. You should keep this in mind when comparing the tagtrace output against the document.
Configuring tag tracing
Tag tracing is configured through the tagtrace document preference macro or the <?tagtrace> PI. It can be enabled either on a global (as in ’within the current session’) or a document basis. You choose the one which makes most sense for your debugging activity.
Configuring the tagtrace preferences is done from two dialogs which are called by entering tagtrace for the document preferences and tagtrace * for the global preferences. Note that there is a button on the document preferences dialog to take you to the global preferences.
The global tagtrace preferences are saved along with other PTC ALD global preferences in the file spref.3d, while changing a document’s tagtrace preferences will result in these being saved in its fdpref section. The two sets of options are the same except for the way in which tag tracing is activated.
Tag tracing options
The tagtrace output can be altered by selecting the various options in the box labelled Options on the tagtrace dialog windows. By default, if none of these are selected then the output will only include non _s_h_o_w streams, and non label/jump tags.
The available options are:
Show ><!comments...>
Filtering out comment tags can greatly reduce the size of output
Show jump/labels
With this enabled, it will report if the target label was found and if so at what position
Show stream depth indentation
This causes output to be indented by two spaces for each level of ’stream depth’
Show tag stream position
This will prefix tags with the stream position they are found at
Show <?show...> results
This appends the result of a show string eg. <?show "^pts"$^[propval th]> (Variable: pts) 42175
Show <^...> variable substitution results
This appends the result of any variable substitutions eg. <^?twe=^"max_ws"> <?twe=.15w>
Show _s_h_o_w streams
These are internally created implementation dependent streams which you may wish to ignore
Show counters on stream switch
This will output the values of all non-zero counters at the start of each stream switch NB. this can greatly increase the size of output
Show format strings on stream switch
This will output all non empty format strings at the start of each stream switch
Show frame information
This will write out a frame’s name, position and dimensions following a <?frame add-to-page>
For more information, see Technote 0101: Tag tracing debug facility.
Related Links