-
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 [DebuggerGuidedStepThrough] to new invoker methods #89596
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsAdd these missing attributes to make the newly added invoker APIs consistent with the standard invoke APIs in NativeAOT. CoreClr info: using "Just My Code" does work with the newly added invoker APIs for CoreClr; that is, you can step into the invoked method. With "Just My Code" off, however, the stepped-into method is hit-or-miss for both the new invoker APIs as well as the existing ones (one of the internal framework methods will be stepped into). We could add
|
Does this change cause any observable behavior under unmanaged debugger that's the only debugging story for native AOT at the moment? |
Native AOT currently doesn't respect this (the attribute is a leftover from .NET Native). It should be possible to make this work on Windows with 0xF00F00/0xFEEFEE magic line numbers, but I'm not aware of a way to make this work outside Windows so the priority of implementing this is lower right now since we can't make it work crossplat. |
@MichalStrehovsky feel free to close this PR if it doesn't matter - I just created this PR for consistency. |
I don't mind either way - it's possible we'll want to fix this at some point. But to merge this, uses in ConstructorInvoker.cs will need to be updated to call PreviousCallContainsDebuggerStepInCode, similar to how it's called in MethodInvoker.cs. |
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.
Thank you!
Add these missing attributes to make the newly added invoker APIs consistent with the standard invoke APIs in NativeAOT.
CoreClr info: using "Just My Code" does work with the newly added invoker APIs for CoreClr; that is, you can step into the invoked method. With "Just My Code" off, however, the stepped-into method is hit-or-miss for both the new invoker APIs as well as the existing ones (one of the internal framework methods will be stepped into). We could add
[DebuggerHidden]
and[DebuggerStepThrough]
to more methods to make step-in work when "Just My Code" is off, like we already have in the standard invoke code, although in general that doesn't work either and\or is fragile due to reflection calling non-reflection code such as in Span, Signature, etc. which would also need these attributes.