Home   |   QuickStart Welcome   |   ASP.NET   |   Web Services   |   How Do I...?   
  |   I want my samples in...      

How Do I...? Common Tasks QuickStart Tutorial

How Do I...Debug an XSL Transformation Application?

This sample illustrates how to debug an XSLT application.

VB TransformXML.exe
View Source
[This sample can be found at C:\DevFusion.Data\legacy\quickstart.developerfusion.co.uk\QuickStart\howto\samples\Xml\TransformXML_Debug\]

The debugger can be used to an XSLT application. When instantiating the XslCompiledTransform object, set the enableDebug parameter to true in your code. This tells the XSLT processor to create debug information when the code is compiled. You can start debugging as you would with any other application. When you get to the Transform method call, you can press F11 to step into the code. This loads the XSLT style sheet in a new document window and the starts the XSLT debugger. You can now set breakpoints in the style sheet, step through the code the style sheet, and so on.

The following code enables debugging on the XslCompiledTransform object.

		
XslCompiledTransform myProcessor = new XslCompiledTransform(true);
C#

Summary

  1. The Visual Studio debugger can be used to debug XSLT style sheets or XSLT applications.
  2. To debug an XSLT application, set the enableDebug parameter to true when instantiating the XslCompiledTransform object. This tells the XSLT processor to create debug information when the code is compiled.
  3. Set a breakpoint on the Transform method call.
  4. Start the Visual Studio debugger and press F11 to step into the XSLT code. The XSLT style sheet is loaded in a new document window and the XSLT debugger is started.
  5. The XSLT debugger is available on the Professional and Enterprise editions of Visual Studio.




Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright � 2004 Microsoft Corporation. All rights reserved.