xsl-list
[Top] [All Lists]

Re: [xsl] Managing debug logging in complex transforms: what do people do?

2014-03-25 05:29:32
On 3/25/14, 11:26 AM, Alex Muir wrote:
On Tue, Mar 25, 2014 at 8:25 AM, George Cristian Bina
<george(_at_)oxygenxml(_dot_)com> wrote:
Yes, optimizations in the XSLT processor like lazy evaluation may interfere
with the debugging experience. Please at least make sure the "Optimization
level" is set to 0 (zero) in the Saxon "Advanced options" dialog.

What effects does this have on the debugging experience for example?

It will minimize the number of optimizations that Saxon will apply to the XSLT code so there are increased chances that the execution will follow the XSLT as written and thus you will be able to match the processor execution to the XSLT source when you step though the code.

The debugger basically shows the state of the XSLT processor as it runs the code. For example, if the XSLT processor will delay the evaluation of a variable, then the debugger has no way to force that evaluation when the variable is declared and when the variable is used for the first time you will see the processor going into the code that specifies the value of that variable.

Would that for example lead to stepping through the code with output
not being output in the right side window as expected at the time one
is moving through the code, and then all the output comes out at later
moment when it's a bit late to be of use really?

The output is presented as the XSLT processor emits output. Usually there is a slight delay there from the executed instruction, for example if you execute an xsl:element then that is not immediately emitted, the processor will wait to see if there are any attributes and the start tag will be emitted when the first chlid node of that element is created or the element is determined to be empty.

I've definitely use the debugger and with success often however
sometimes it's a pain.

I wonder without really thinking much into it if the controls and or
logic for debugging are borrowed from procedural languages and could
perhaps be quite different for xslt? ( no idea but what do you think?)

I will reply on the other message that you sent, where you add more details to this.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>