Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xslt debugging shows all values as null

I am using visual studio 10 premium with .Net 3.5 and trying to debug an XslCompiledTransform.

I can step through everything OK but all variable values seem to be shown as NULL. For instance self::node() shows as NULL in the locals window; if I put self::node() into the watch window it says "Unable to evaluate the expression. Invalid pointer"

the only variables which seem to have a value are position() and last()

like image 883
Andy Avatar asked Feb 14 '13 09:02

Andy


1 Answers

In my case, with Visual Studio 2010, it continually either crashes or does not break on breakpoints at all.

These problems seem to be remedied with Visual Studio 2012 and up, where XSLT debugging just works.

If you are stuck with Visual Studio 2010, use xsl:message to get diagnostic messages, or replace places where you use xsl:apply-templates with xsl:copy-of with the same selection. Double-check your namespaces, as that is the most common reason that matches are not triggered, or selections are empty.

like image 105
Abel Avatar answered Oct 04 '22 11:10

Abel