[oXygen-user] Debugger stops showing parameters for a while?
lars_huttar at sil.org
Thu Sep 6 08:30:39 CDT 2012
Thank you for this explanation ... it helps to have an idea of why this
is happening, and to have a workaround.
Two follow-up questions:
1) Why are these parameters not visible inside XPath expressions, when
those expressions are in the scope where those parameters/variables
should be visible? If the parameters were referenced within the XPath
expressions, that would be a valid reference, so it's hard to understand
why the evaluation context there doesn't show certain variables.
2) It seems unfortunate that turning on the trace of XPath expressions
actually removes the ability to see the values of certain variables,
relative to having the XPath trace turned off. Certainly there are times
when stepping through XPath expressions will be very helpful (or even
crucial), in which case one has to sacrifice visibility of variables. If
these variables cannot be displayed while stepping through an XPath
expression, could additional stepping points be inserted, so that the
value of a variable can be inspected as soon as it is computed, before
entering the XPath evaluation context?
E.g. in the example I gave, I'm able to inspect the value of the first
passed-in parameter, $mixedItemTypes, before the next <xsl:param> is
evaluated. It would be very helpful (and consistent) to be able to do
the same with the $tableScopeType parameter before entering the XPath
expression in <xsl:variable name="file" select="."/>. Maybe this can be
accomplished by inserting another stepping point after <xsl:param
name="tableScopeType" select="''" as="xs:string"/> ?
Thanks as always for a great tool. My team and I have been annual
subscribers for several years, and we continue to be convinced that
we're getting a great value from oXygen.
On 9/6/2012 6:03 AM, Oxygen XML Editor Support wrote:
> Dear Lars,
> At some point we added support for allowing the debugger to step also
> inside XPath expressions. This is what happens in your case and the
> evaluation context is changed, that is why those variables are not
> visible at that moment. You can turn that off from
> Options -> Preferences -- XML / XSLT-FO-XQuery / XSLT / Saxon /
> Saxon-HE/PE/EE by disabling the "Debugger trace into XPath expressions
> (applies to debugging sessions)" option.
> Best Regards,
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> On 9/6/12 5:31 AM, Lars Huttar wrote:
>> I'm using Oxygen 14.0, build 2012062215.
>> In the debugger, with Saxon 220.127.116.11 PE. I have a stylesheet running with
>> a specified XML document as input. A certain named template is called,
>> <xsl:template name="allowed-formats">
>> <xsl:param name="mixedItemTypes" select="false()"
>> <xsl:param name="tableScopeType" select="''" as="xs:string"/>
>> <xsl:variable name="file" select="."/>
>> <xsl:variable name="typePlural" select="local-name($file/..)"/>
>> I step through these lines one by one using "Step Into".
>> When the cursor goes past the first <xsl:param> line, the debugger
>> "Variables" window shows the mixedItemTypes parameter, as it should.
>> But when I step past the second <xsl:param> line (and the cursor goes to
>> the "."), the $mixedItemTypes parameter disappears from the Variables
>> window, and the $tableScopeType parameter doesn't show up.
>> After a few more steps in the same template, both parameters appear in
>> the Variables window.
>> This makes it very awkward to debug what's happening, if the time when
>> you need to see the value of one of the parameters happens to be a time
>> when it won't show up.
>> Also, when these parameters are not showing in the "Variables" window,
>> they also are inaccessible from expressions (e.g. "$tableScopeType") in
>> the XWatch window.
>> Thanks for helping me understand and overcome whatever is going on here.
>> oXygen-user mailing list
>> oXygen-user at oxygenxml.com
More information about the oXygen-user