Inserting a Breakpoint in the Sample Stylesheet

This topic is part of a sequence that starts with Setting Up Stylus Studio to Debug Sample Files.

As with any debugger, in the Stylus Studio XSLT debugger you insert a breakpoint where you want to suspend processing and examine what is going on. You can do this using the Debug menu or the debug set of tools in the tool bar.

Tip

 

Tools in the tool bar are in grouped by function. These groups, like the one for debug tools shown here, are dockable and can be moved anywhere you please.

To insert a breakpoint in the sample stylesheet:
1. In the XSLT Editor, click in line 202. Line numbers appear in the lower right corner of the XSLT Editor window. Line 202 starts with
<xsl:template match="director">
       

    

Tip

 

To display lines in Stylus Studio text editors, click Tool > Option > Editor General, and select Show line numbers.

2. In the Stylus Studio tool bar, click Toggle Breakpoint .

Alternative: If you prefer, select Debug > Toggle Breakpoint, or press F9.

Stylus Studio displays a red circle to the left of the line that contains the xsl:template match="director" instruction. The XSLT processor will stop processing when it gets to the instantiation of this template.

Figure 54. A Red Circle Shows Where Breakpoints Are Set

Do not do it, but to remove a breakpoint, you click in the line that has the breakpoint and then click Toggle Breakpoint (or F9). The Toggle Breakpoint button and F9 key operate as toggles.

3. Press F5 to start debugging.

Alternative: In the Stylus Studio tool bar, click Start Debugging .

The XSLT processor displays a yellow triangle to indicate where processing has been suspended. Instead of the finished HTML created when you first ran the scenario, the Preview window displays just the HTML code because complete processing of the XSLT was suspended before the finished HTML could be rendered.

Figure 55. Yellow Triangle Shows Where XSLT Processing Stopped

Do not do it, but to stop debugging, you can click Cancel in the lower right corner of the XSLT editor window, or click Stop Debugging in the Stylus Studio tool bar.

If you click Preview Result instead of pressing F5, Stylus Studio applies the stylesheet without running the debugger. Pressing F5 always invokes the debugger. If there are no breakpoints, and no errors, processing completes and Stylus Studio displays the result in the Preview window.

Stylus Studio User Guides (PDF Download)

Download Stylus Studio User Guides in printer-friendly PDF format, including documentation of past (older) versions of Stylus Studio.

Biotechnology & Pharmaceuticals

Leading biotechnology & pharmaceuticals companies take Stylus Studio when they are feeling under the weather. Come see for yourself how Stylus Studio can be a pick me up for your biotechnology or pharmaceutical company.

XML Parser

An XML Parser is a parser that is designed to read XML and create a way for programs to use XML. Learn about Stylus Studio's comprehensive support for all of the world's leading XML Parsers.

XQuery API for Java (XQJ)

DataDirect XQuery is an embeddable software product based on the XQuery and XQJ standards that enables Java developers to access both relational and XML data sources using a single XQuery query. Runs on Oracle, SQL Server, DB2, and more!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member