benaadams / Ben.Demystifier

High performance understanding for stack traces (Make error logs more productive)
Apache License 2.0
2.76k stars 118 forks source link

How can I Demystify a string with the callstack? #178

Open MagicAndre1981 opened 2 years ago

MagicAndre1981 commented 2 years ago

I get a string from a library (without source and chance to get it updated) with a callstack of the operation. This includes all junk, but now I'm a bit lost as EnhancedStackTrace doesn't have a constructor to pass a string with the stack.

How can I demystify a string with the callstack?

thomaslevesque commented 2 years ago

Also interested in this. It would be very useful to help investigate issues in code not equipped with this library.

MagicAndre1981 commented 2 years ago

I never got a replay from @benaadams so I have no idea if this is possible. Maybe it requires an API change in the runtime to create a StackTrace object from a string.

mitchcapper commented 2 years ago

Highly unlikely. Right now this uses the stack frames and assembly information to resolve things to readable strings (and skip fluff). You might be able to somewhat cleanup a stringified stacktrace but even then would need the reference assemblies and to write your own parser. There is more data in a true ST than what ToString shows.

MagicAndre1981 commented 2 years ago

Highly unlikely.

ok, thanks for your information.