-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DebuggerDisableUserUnhandledExceptionsAttribute #104813
Add DebuggerDisableUserUnhandledExceptionsAttribute #104813
Conversation
- Also add Debugger.BreakForUserUnhandledException(Exception)
Note regarding the
|
1 similar comment
Note regarding the
|
src/mono/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs
Outdated
Show resolved
Hide resolved
Tagging subscribers to this area: @tommcdon |
src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
/// exception is caught by a method with this attribute, unless BreakForUserUnhandledException is called. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method)] | ||
public sealed class DebuggerDisableUserUnhandledExceptionsAttribute : Attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably isn't going to make much of a difference, but should we add this new attribute to
runtime/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml
Lines 2 to 31 in d710379
<!-- The following attributes are only necessary when debugging is supported --> | |
<assembly fullname="System.Private.CoreLib" feature="System.Diagnostics.Debugger.IsSupported" featurevalue="false"> | |
<type fullname="System.Diagnostics.DebuggableAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerBrowsableAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerDisplayAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerHiddenAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerNonUserCodeAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerStepperBoundaryAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerStepThroughAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerTypeProxyAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
<type fullname="System.Diagnostics.DebuggerVisualizerAttribute"> | |
<attribute internal="RemoveAttributeInstances" /> | |
</type> | |
</assembly> |
That way it gets trimmed when DebuggerSupport is off.
Fixes #103105