Welcome   |   ASP.NET   |   Web Services   |   How Do I...?   |   Class Browser
  |   I want my samples in...   

How Do I...? Common Tasks QuickStart Tutorial

Go To...

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

This sample illustrates how to debug an XSLT application.

C# TransformXML.exe
View Source

[This sample can be found at M:\web\users\Sites\AspnetQuickStart\v2.0\QuickStart\howto\samples\Xml\TransformXML_Debug\
To build this sample, open the SDK command prompt and navigate to the above path. Build the sample using the build tool msbuild passing the solution file as the first parameter: msbuild mySample.sln. The compiled executable will be found in the sub directory \bin directory.]

The Visual Studio debugger can be used to debug 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 in the style sheet, and so on.

Note
The XSLT debugger is available in the Professional and Enterprise editions of Visual Studio.

The following code enables debugging on the XslCompiledTransform object.

		
XslCompiledTransform processor = 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.




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


Hosted by MaximumASP | Found a broken link? | Contact Us | Terms and conditions | Privacy Policy | Advertise with us
� 2000 - 2008  Mindcracker LLC. All Rights Reserved