Template Debugger Reference

This is a template debugger that can help you determine why your template is not generating the output you expect. It works by stepping through the template Tag by Tag as each Tag is processed in the template. You can also set breakpoints and run the template to that breakpoint.

Debugger Modes

The debugger moves through a set of modes as it processes the template:

  1. The template is loaded. Nothing has occurred yet.
  2. The template is parsed. This is when the Tags are found in the template.
  3. The data source is initialized and loaded.
  4. The template Tags are processed by the data source.
  5. The report is complete.

Modes 2 and 4 can be stepped through Tag by Tag.

Modes 2, 3 and 4 will repeat each time an Import Tag is processed and the import is a template.

In mode 4 you can set breakpoints on Tags and then run to that breakpoint.

When an Import Tag is importing a template, that template is inserted into the main template in memory. So an Import Tag will then have to parse the template, insert the parsed template into the main template, and then start processing Tags in the imported template, as the imported template is now the next item in the main template.

Opening the Debugger

To open the Template Debugger, on the Windward Tools tab of the Office ribbon, click on the Debugger button and select "Template."

The Menu

The Template Debugger is controlled with the buttons across the top of its interface:

  1. Play/Continue - run until the next mode or until a breakpoint is hit, whichever comes first.
  2. Pause - stop executing on the next Tag.
  3. Stop - stop processing the template.
  4. Step - run to the next Tag or mode change.
  5. Add breakpoint - set a breakpoint on the selected Tag.
  6. Delete breakpoint - delete the breakpoint on the selected Tag.
  7. Delete all breakpoints - delete all breakpoints.
  8. Windows - select the window clicked on.

The Windows

The Three Main Windows

The Debugger UI always displays three main windows. Some windows will be blank when they have nothing to display in that mode.

  • Tag Tree - the Tags in the template so far.
  • Template - the template as it is parsed. When Import Tags are processed this will grow to include the imported template.
  • Report - the generated report. As each Tag is processed, this will grow.

Property Windows

There are also three Property Windows, whose display depends on the tabs selected:

  1. Datasource - the properties of the data source presently being processed.
  2. Exception - if you hit an exception, this will display the exception properties.
  3. ForEach Stack - if you are presently inside a/several ForEach loop(s), this will list the ForEach Tags.
  4. Import Stack - if you are presently inside a/several Import Tag(s), this will list the imported file(s).
  5. Properties - when you are on a Tag this will list all of the Tag's properties.
  6. Query Stack - this will list all Query Tags processed already.
  7. Variables and Sets - this will list all variables and Set Tag values processed.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.