The dart2js tool provides hints for improving your Dart code and removing unused code . Also see dart analyze , which performs a similar analysis but has a different implementation. This page tells you how to use dart2js on the command line. It also give tips on debugging the JavaScript that dart2js generates.