-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
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
Actually, doesn't this make |
Yep; you get everything if you are processing the frames; nothing is hidden from you (unless its in the Diagnostics namespace) |
Changing the frames would probably be a horribly breaking change; I wasn't even intending on changing the frames for the prettification of callers - just adding additional detail for the frames; and using it in |
@benaadams I'm not sure why it would be a breaking change. As @stephentoub pointed out the frames may get inlined already or internal refactoring may change them. |
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, @benaadams.
Tools (could be a structured logger or analysis tool) will process the frames to determine what is being executed; and to extract further detail; don't want to lie to them and they can use the same method to hide (or later resolve) if they choose; as they can the the info from reflection. Processing the textual The goal I have been aiming for is so someone can call
The line numbers via PDB match back(ish) to the line numbers in the source code but the function names are wacky. Its what the actually executing function are called post compile - but its still a compilation detail. So ideally I want to resolve it back to the source code's function names (including the framework source). In javascript land they have .map files; so if you write one of the transpiled languages typescript, coffeescript etc you get back stack traces in that rather than the rather weird javascript the transpiling produces - so its a similar goal that other ecosystems already have. Also to a new user hitting an error using any of these powerful language features; outside the debugger, |
|
||
namespace System.Diagnostics | ||
{ | ||
|
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.
Nit: Extra new line
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.
removed
namespace System.Diagnostics | ||
{ | ||
|
||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor | AttributeTargets.Struct, Inherited = false)] |
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.
Nothing is looking for this attribute on properties today - it may be better to omit AttributeTargets.Property
.
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.
removed
Fair enough. However, since this change is making
So which one should it print out? What if there are frames from multiple languages on the stack? Should it show everything in format of the language it was invoked from or should it rather format each frame according to the language the method was written in? It would be certainly nice to bring Another possible approach would be to leave
The PDB is not just a pile of line number mappings. It associates the MoveNext method with the kickoff method exactly. See https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PortablePdb-Metadata.md#StateMachineMethodTable for Portable PDB and https://github.com/dotnet/symreader/blob/master/src/Microsoft.DiaSymReader/Reader/ISymUnmanagedAsyncMethod.cs#L18 for Windows PDB.
In .NET land we have .pdb files for the same purpose. |
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Hopefully; maybe it could be better phrased as
Its bringing ToString closer to VS debugger
Whoa... now we are cooking with gas... 😄 |
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
@stephentoub Could this be labeled as |
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Follow on from #14564, #14608
Hides from stack trace:
/cc @stephentoub @noahfalk @jkotas PTAL