I am trying to debug some XSLT as I am having a problem with a rather large XSLT file and not sure where the problem is happening so wondering if its possible to debug and get the values of items like you can in Visual Studio debugging.
Yes it is possible. As long as you have a copy of your XSLT files in your visual studio project file, you can either use the "attach process" to attach to an IIS process, or what I do is in the properties of your web project ( in the web section ) I just set the option to "use custom web server" and I put in the name of my local site ( running on my PC )
You can then set break points in your XSLT file in just the same way as you do for any other code, click run and use your faviourite browser to browser to the page where your XSLT appears and then low and behold you should be able to step through your XSLT :)
Important to note that the XSLT debugging in Visual Studio only works in the Professional edition (or above). It doesn't work in Standard edition - same goes for XSLT intellisense! ;-(
Hello, today in found this really awesome XSLT debugging article from Dirk! Thx a lot Dirk for sharing! But it dosn't work with Visual Studio 2010. For example there is no access to the $currentPage node.
I think the morale was that Umbraco provides you with different tools to get the job done and you can do it in many different way. It really showed that Umbraco is flexible in many different ways.
Debugging xslt
Hi All,
I'm just wondering if anyone can help me out.
I am trying to debug some XSLT as I am having a problem with a rather large XSLT file and not sure where the problem is happening so wondering if its possible to debug and get the values of items like you can in Visual Studio debugging.
Thanks in advance
Tom
Hi Tom,
Yes it is possible. As long as you have a copy of your XSLT files in your visual studio project file, you can either use the "attach process" to attach to an IIS process, or what I do is in the properties of your web project ( in the web section ) I just set the option to "use custom web server" and I put in the name of my local site ( running on my PC )
You can then set break points in your XSLT file in just the same way as you do for any other code, click run and use your faviourite browser to browser to the page where your XSLT appears and then low and behold you should be able to step through your XSLT :)
Cheers,
Chris
Important to note that the XSLT debugging in Visual Studio only works in the Professional edition (or above). It doesn't work in Standard edition - same goes for XSLT intellisense! ;-(
I've done a short how-to here.
Cheers,
/Dirk
Hello,
today in found this really awesome XSLT debugging article from Dirk! Thx a lot Dirk for sharing!
But it dosn't work with Visual Studio 2010.
For example there is no access to the $currentPage node.
Has anyone figured out a solution?
Thx a lot!
Stevo
I've got the same problem. I upgraded to VS2010 and now debugging XSLT files doesn't work anymore. The breakpoint never get's hit. Any suggestions?
I've just installed VS2008 and I can't seem to debug XSLT in VS2008 aswell. I also upgraded to Windows 7. Could this cause any problems?
Jeroen: It works for me in 2008/2010 in the set-up that I've described on my blog. Hope it helps you out..
@Sebastiaan Thanks for the tip, but your sample is for debugging user controls. Debugging user controls works fine, but I can't debug XSLT files.
Warren just showed the debugging @ Codegarden 2010 here in Copenhagen. You could be here and watch the XSLT vs LinQ match as well, it was very funny!
I guess there is also a video at Umbraco TV about debugging.
Codegarden Rocks!
What was the outcome of XSLT vs LINQ? I'm guessing XSLT was much faster?
LINQ vs XSLT (the grudge match) was a draw - although I'm sure both parties disagree with that! ;-)
I think the morale was that Umbraco provides you with different tools to get the job done and you can do it in many different way. It really showed that Umbraco is flexible in many different ways.
is working on a reply...