简体   繁体   中英

C# DebuggerStepThrough Usage

Is there any performance or resource overhead in keeping using System.Diagnostics and DebuggerStepThrough attributes in code that is compiled into production? Is it bad team practice to push these attributes into a repo branch shared by others, if their addition is your preference for debugging? Finally, I have seen this variation of the attribute in auto generated code: [System.Diagnostics.DebuggerStepThroughAttribute()] . Is this format more concise in regard to what is used from System Diagnostics?

There won't be any performance issue because it has nothing to do with CLR. Below is the microsoft documentation that describes the DebuggerStepThroughAttribute. Hope this helps.

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.debuggerstepthroughattribute?view=net-6.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM