dart2js stacktrace deminification

175 views
Skip to first unread message

Björn Melinder

unread,
Apr 28, 2014, 5:48:38 AM4/28/14
to mi...@dartlang.org
Hi everyone,

I need a way to deminify dart2js stacktraces for troubleshooting. I couldn't find a tool for this, is anyone working on one?

I made kind of a node.js hack to accomplish this based on the map file produced by dart2js and the node.js source-map library. Unfortunately, the output only works part of the time and only file:linenumber is correct, class and method is often missing. I've attached anyway in case anybody is interested in using it or improving it. Usage is:

node demin.js <mapping file>

after which you paste the stack trace to stdin followed by a blank line.

Cheers,
Bjorn
demin.zip

Peter Ahé

unread,
Apr 28, 2014, 6:40:06 AM4/28/14
to mi...@dartlang.org
We are working to improve the source map information emitted by dart2js. This is a project that started recently.

In addition, we're also looking at getting better integration with V8 and Chrome DevTools. I'm not sure what the status is. Ideally, stack traces and local variables wouldn't be minified when debugging.

We are aware that debugging JavaScript output from dart2js is a horrible experience.

FWIW, there is a Dart package for reading source maps: http://pub.dartlang.org/packages/source_maps. So it should be trivial to port demin.js to Dart.

Cheers,
Peter
--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Björn Melinder

unread,
Feb 1, 2015, 3:24:19 PM2/1/15
to mi...@dartlang.org
I finally managed to create a dart command line tool which deminifies stack traces. It's using the source_maps package. Here it is, available as a pub package: 
Reply all
Reply to author
Forward
0 new messages