Page 1 of 1

Debugging XSLT template, breakpoints and stepping

Posted: Wed Aug 17, 2016 11:58 am
by daliboris
I see different behavior during debugging XSLT template with XML file:

When I set breakpoint on element in XSLT stylesheet, stepping Into, Over and Out works fine, but when the breakpoint is set on the element in XML file, these different types of steps can't be used: whatever I choose, only one step (line) is executed.

The solution is removing breakpoint in XML file, but when XSLT transformation continues, XML element with previously set breakpoint moves away.

Is it expected behavior of debugging, or I missed some option for debugging?

Re: Debugging XSLT template, breakpoints and stepping

Posted: Wed Aug 17, 2016 3:57 pm
by adrian
Hello,
When I set breakpoint on element in XSLT stylesheet, stepping Into, Over and Out works fine, but when the breakpoint is set on the element in XML file, these different types of steps can't be used: whatever I choose, only one step (line) is executed.
Note that Step Over and Step Out are still subject to breakpoints. So, if a breakpoint is encountered during stepping over/out, the debugger will still stop for it. Only Run to Cursor and Run to End ignore breakpoints.

The "difference" between XML and XSL breakpoints is that when you set a breakpoint on an element from the XML file, you are setting a breakpoint for when the current XML context is that element. So, for as long as you are within an xsl:template that matches that element with the breakpoint, the breakpoint will match and the debugger will stop at each step, so stepping in/out/over will not get you further than the next step of the XSL code.

To answer your question, yes, it's expected behavior.

Regards,
Adrian