XslCompiledTransform Constructor (Boolean)

Initializes a new instance of the XslCompiledTransform class with the specified debug setting.

Namespace:  System.Xml.Xsl
Assembly:  System.Xml (in System.Xml.dll)

public XslCompiledTransform(
	bool enableDebug


Type: System.Boolean

true to generate debug information; otherwise false. Setting this to true enables you to debug the style sheet with the Microsoft Visual Studio Debugger.

The following conditions must be met in order to step into the code and debug the style sheet:

The following example shows how to enable XSLT debugging.

// Enable XSLT debugging.
XslCompiledTransform xslt = new XslCompiledTransform(true);

// Load the style sheet.

// Create the writer.
XmlWriterSettings settings = new XmlWriterSettings();
XmlWriter writer = XmlWriter.Create("output.xml", settings);

// Execute the transformation.
xslt.Transform("books.xml", writer);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft