Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 2.0
System.Diagnostics
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
.NET Framework Class Library
DebuggerStepThroughAttribute Class

Specifies the DebuggerStepThroughAttribute. This class cannot be inherited.

Namespace: System.Diagnostics
Assembly: mscorlib (in mscorlib.dll)

Visual Basic (Declaration)
<SerializableAttribute> _
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Constructor Or AttributeTargets.Method, Inherited:=False)> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class DebuggerStepThroughAttribute
    Inherits Attribute
Visual Basic (Usage)
Dim instance As DebuggerStepThroughAttribute
C#
[SerializableAttribute] 
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, Inherited=false)] 
[ComVisibleAttribute(true)] 
public sealed class DebuggerStepThroughAttribute : Attribute
C++
[SerializableAttribute] 
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Struct|AttributeTargets::Constructor|AttributeTargets::Method, Inherited=false)] 
[ComVisibleAttribute(true)] 
public ref class DebuggerStepThroughAttribute sealed : public Attribute
J#
/** @attribute SerializableAttribute() */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, Inherited=false) */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class DebuggerStepThroughAttribute extends Attribute
JScript
SerializableAttribute 
AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, Inherited=false) 
ComVisibleAttribute(true) 
public final class DebuggerStepThroughAttribute extends Attribute

The common language runtime attaches no semantics to this attribute. It is provided for use by source code debuggers. For example, the Visual Studio 2005 debugger does not stop in a method marked with this attribute but does allow a breakpoint to be set in the method.

For more information about using attributes, see Extending Metadata Using Attributes.

System.Object
   System.Attribute
    System.Diagnostics.DebuggerStepThroughAttribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Community Content   What is Community Content?
Add new content RSS  Annotations
Wouldn't it be great      Perley   |   Edit   |   Show History
This would be even more useful if it could be applied to properties.
Tags What's this?: Add a tag
Flag as ContentBug
Unavoidable consequences of attribute applied through XSD tool      ClimberWill   |   Edit   |   Show History

This attribute is applied to classes generated by the XSD tool. I ran into trouble debugging a constructor I created for one of these partial classes with this attribute. Unfortunately it took the help of MS to identify why I was getting such odd behavior debugging. The work around is to comment out the attribute in the generated file while you debug.

If it was possible to allow debugging to occur on cetain methods it would be more useful.

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker