Tinderbox v10 Icon

Debugging user Export code

In additions to the techniques suggested for Action code debugging, consider:

* Using ^action()^ to record template-only calculations back into user attributes for later inspection. This is useful with complex exports. Once the export process is validated, instead of using attribute values, action code variables can be used instead. If using variables to store sections of pre-evaluated code, it is a good idea to purge the attributes after use. By comparison variables are non-persistent and so purge themselves. * Using the text pane's HTML and Preview tabs to check export code before actual export. * Full HTML export looks at whether source attributes have changed, thus changes in templates code are not 'seen' and the process can become obfuscated in complex include exports. One way around this is simply to delete (or move) previously exported files as full export will export a note if it is not found at the export location. * The File menu ▸ Export Selected Note option can 'force' export a single note, though note the offered filename may not be that used in full export if the note's automatically derived filename is not unique within the scope of its present container. If exporting over a previous full export, select the old filename in the export location dialog so the name is re-used and the new file overwrites the old one. * The effects of $HTMLDontExport and $HTMLExportChildren on the use of ^include^. The latter cannot return data from a note that is configured to not export. * For $Text export using ^text^ remember the effects of $HTMLMarkupText and $HTMLQuoteHTML. * The slightly different effects of ^title^ vs. ^value($Name)^ and ^text^ vs. ^value($Text)^.