Breakpoints

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  User Guide and Reference > XSLT/XQuery Debugger and Profiler > XSLT and XQuery Debugger >

Breakpoints

The XSLT and XQuery Debugger enables you to define breakpoints in XSLT, XQuery, and XML documents. Breakpoints are displayed as a dashed red line (shown in the screenshot below).

 

Please note: It is possible to set a tracepoint and a breakpoint for the same instruction. This appears as a dashed blue and red line (see screenshot).

dbg_breakpoint

When you start the debugger within a debugging session, the debugging will pause at each encountered breakpoint. In this way, you can identify specific areas to debug, and restrict attention to these areas in either the XSLT, XQuery, and/or XML documents. You can set any number of breakpoints.

 

Note:Breakpoints set for a document remain in that document until it is closed. However, if you switch to Schema View (for example, in the case of XSD documents), then the breakpoints are deleted; when you switch back to Text View or Grid View (from Schema View), there will be  no breakpoint.

 

Breakpoints in XML documents

You can set breakpoints on any node in an XML document. The break in processing will occur at the start of that node.

 

Breakpoints in XSLT documents

You can set breakpoints at the following points in an XSLT document:

 

At the beginning of templates and template instructions (e.g., xsl:for-each).
On an XPath expression (XPath 1.0 or XPath 2.0).
On any node in a literally constructed XML fragment. The break in processing will occur at the start of that node.

 

Breakpoints in XQuery documents

You can set breakpoints at the following points in an XQuery document:

 

At the beginning of XQuery statements.
In an XQuery expression.
On any node in a literally constructed XML fragment. The break in processing will occur at the start of that node.

 

Inserting/removing breakpoints

To insert a breakpoint:

 

1.Place the cursor at the point in the document where you wish to insert the breakpoint (see paragraphs above). In XSLT debugging sessions, you can set breakpoints in both Text View and Grid View. XQuery debugging sessions are available only in Text View.
2.Do one of the following:

 

Select XSL/XQuery | Insert/Remove Breakpoint.
Press F9.
Right-click and select Insert/Remove Breakpoint.

 

To remove a breakpoint:

 

1.Place the cursor at the point in the document containing the breakpoint.
2.Do one of the following:

 

Select XSL/XQuery | Insert/Remove Breakpoint.
Press F9.
Right-click and select Insert/Remove Breakpoint.

 

Alternatively, you can use the Breakpoints dialog to remove a breakpoint:

 

1.Select the menu option XSL/XQuery | Breakpoints....
2.Click the breakpoint in the dialog box and click Remove.

 

The Remove All button deletes all the breakpoints from the dialog box (and all XSLT stylesheets).

 

Disabling/enabling breakpoints:

After inserting breakpoints, you can disable them if you wish to skip over breakpoints without having to delete them. You can enable them again when necessary.

 

To disable a breakpoint:

 

1.Place the cursor in the node or expression containing the breakpoint.
2.Select XSL/XQuery | Enable/Disable Breakpoint (or press Ctrl+F9). The breakpoint changes from red to gray, indicating that it has been disabled.

 

Alternatively, you can use the Breakpoints dialog to disable a breakpoint:

 

1.Select the menu option XSL/XQuery | Breakpoints/Tracepoint.... This opens the XSLT Breakpoints / Tracepoints dialog box which displays the currently defined breakpoints in all open XML source and XSLT stylesheet documents.

xsl_break2

2.Remove the check mark of the breakpoints you wish to disable, and click OK to confirm. The breakpoint changes from red to gray, indicating that it has been disabled.

 

To enable a breakpoint:

 

1.Place the cursor in the node or expression containing the breakpoint.
2.Select XSL/XQuery | Enable/Disable Breakpoint (or press Ctrl+F9). The breakpoint changes from gray to red, indicating that it has been enabled.

 

Finding a specific breakpoint

To find a specific breakpoint:

 

1.Select the menu option XSL/XQuery | Breakpoints/Tracepoints.... The XSLT Breakpoints / Tracepoints dialog appears.
2.Click the required breakpoint in the breakpoint list.
3.Click the Edit Code button. The Breakpoints dialog box is closed and the text cursor is placed directly in front of the breakpoint in Text view. In the Enhanced Grid view, the table cell containing the breakpoint is highlighted in red.

 

Continuing debugging after a breakpoint

To continue debugging after a breakpoint:

 

Select the XSL/XQuery | Step into or XSL/XQuery | Start Debugger/Go command.

 


© 2019 Altova GmbH