dart-lang / sdk

The Dart SDK, including the VM, dart2js, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
9.97k stars 1.53k forks source link

dart2js: improve deobfuscation of minified stack traces #24168

Open sigmundch opened 8 years ago

sigmundch commented 8 years ago

Upcoming tasks to improve deobfuscation:

vsmenon commented 4 years ago

Dropping to p3 to reflect no active work in the next few months. We should revisit later this year.

sigmundch commented 4 years ago

Actually most of this work is now complete. The main missing item is to improve documentation for customers interested in the new features. Internally this is integrated with our build systems. External users need to use some of the deobfuscation tools we provide to take advantage of the inlining frame data.

sigmundch commented 4 years ago

@ekweible - I heard that you have interest in using some of the deobfuscation tools on your project. Can you also CC here others on your team who I should be in contact with?

@vsmenon - ditto, can you CC others you know that are interested in this?

sigmundch commented 4 years ago

There is very little documentation at the moment, but if there is interest we can put something together and clean up some of the tools to make them available more easily.

We have a set of tools under https://github.com/dart-lang/sdk/tree/master/pkg/dart2js_tools/ that help with debugging production stack traces. Given the source-map file we generate in dart2js, you can take an exception collected at runtime, and run it to the deobfuscate.dart tool. The tool should be able to convert minified names to the original names in error messages and should be able to produce a Dart stack trace that unwinds any inilning decision the compiler made.

evanweible-wf commented 4 years ago

Thanks @sigmundch! @robbecker-wf is also a good point of contact for my team. We're not sure who is going to dig into this yet, but we'll follow up sometime next week.

I imagine we'll take a stab at what you've linked us and see how far we get, but we're definitely interested in solidifying our story around this so any additional documentation in this area would be greatly appreciated!

patkujawa-wf commented 4 years ago

Maybe @yuanmwang-wf is interested as well. I believe he worked on a sourcemapper internal tool for us.