[英]how to debug xslt in umbraco
I want to debug a xslt used in umbraco (4.0) user control. 我想调试umbraco(4.0)用户控件中使用的xslt。 The xslt is using static .net methods from an assembly say MyAssembly.
xslt使用来自程序集的静态.net方法说MyAssembly。 The
xslExtensions.config
has been setup with the following entry <ext assembly="/bin/MyAssembly" type="MyAssembly.Utility" alias="MyAssembly.Utility" />
已使用以下条目设置
xslExtensions.config
<ext assembly="/bin/MyAssembly" type="MyAssembly.Utility" alias="MyAssembly.Utility" />
This is referenced and used in the xslt file like 这是在xslt文件中引用和使用的
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:MyAssembly.Utility="urn:MyAssembly.Utility"....
-------------------------------------------------->
--------------------------------------------------
<xsl:variable name="Id" select="MyAssembly.Utility:GetQueryStringValue('tlid')"></xsl:variable>
The assembly is copied in the bin folder of the application 程序集将复制到应用程序的bin文件夹中
The xslt file is quite big and extensively using .net methods. xslt文件非常庞大且广泛使用.net方法。 I'm just wondering how can I debug the XSLT by adding breakpoints at various lines.
我只是想知道如何通过在各行添加断点来调试XSLT。 If I run the application just like any .net application and put break points then these breakpoints don't get a hit.
如果我像任何.net应用程序一样运行应用程序并放置断点,那么这些断点就不会受到影响。 If I use the XSLT debug options from the Visual studio menu ie
Start XSLT Debugging
then the debugging starts but I get the error on this line <xsl:variable name="Id" select="MyAssembly.Utility:GetQueryStringValue('tlid')"></xsl:variable>
如果我使用Visual Studio菜单中的XSLT调试选项,即
Start XSLT Debugging
则调试开始,但我在此行上收到错误<xsl:variable name="Id" select="MyAssembly.Utility:GetQueryStringValue('tlid')"></xsl:variable>
the error is "Cannot find a script or an extension object associated with namespace 'urn:MyAssembly.Utility'." 错误是“无法找到与命名空间关联的脚本或扩展对象'urn:MyAssembly.Utility'。”
Any ideas how can we debug the xslt as explained in this MS visual studio walk-through https://msdn.microsoft.com/en-us/library/ms255602.aspx using .net methods? 任何想法我们如何调试xslt,如使用.net方法在这个MS visual studio walk- https: //msdn.microsoft.com/en-us/library/ms255602.aspx中所解释的那样?
I have never used XSLT so i'm probably not going to help with what I'm going to say, but since I've been doing this since day 1 why don't you use break points in Visual Studio to see what your code does? 我从来没有使用过XSLT所以我可能不会帮忙解决我要说的问题,但是因为我从第1天起就一直这样做,为什么不在Visual Studio中使用断点来查看你的代码呢? That's the only way I've needed so far in debugging my code.
这是我到目前为止调试代码所需的唯一方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.