WebStorm 2016.1 Help

Dart Support

WebStorm supports developing, running, and debugging Dart code. WebStorm recognizes *.dart files, and allows you to edit them providing full range of coding assistance. Dart files are marked with the icon_dart.png icon.

Dart is intended for developing Web and command-line applications. WebStorm supports both workflows.

  • For running and debugging Dart command-line applications, WebStorm provides a dedicated run/debug configuration of the type Dart Command Line Application.
  • To run and debug a Dart Web application in a browser, you either need to use the Dartium browser or have the Dart code translated into JavaScript.

    Most browsers that work with JavaScript code do not natively process Dart code. The only exception is Dartium. This dart-oriented version of Chromium contains a built-in Dart VM and therefore can run Dart code directly. To be executed in any other browser, Dart code has to be compiled into JavaScript.

    With the pub tool, the compilation is performed through the pub serve action using the built-in dart2js compiler.

    You can run Dart Web application in any browser, while debugging is supported only in Dartium and Chrome. To run a Dart Web application you just need to open the starling HTML page in the browser of your choice. Debugging a Dart Web application is initiated through a run configuration of the type JavaScript Debug.

When the Dart development support is enabled, see Preparing for Dart Development, WebStorm provides full coding assistance, which involves:

  • Code completion for keywords, labels, variables, parameters and functions.
  • Error and syntax highlighting.
  • Code formatting and folding.
  • Numerous code inspections and quick-fixes.
  • Integration with the native Dart static analysis engine: all inconsistencies and potential problems are reported in the dedicated Dart Analysis Tool Window with the possibility to navigate to the fragment of the source code where the problem was detected.
  • Refactoring:
    • Common refactoring procedures, such as extract method , inline, rename/move, etc.
    • Dart-specific refactoring procedures, such as change signature, extract parameter, extract variable.

    See JavaScript-Specific Refactorings for details.

  • Code generation:
  • Navigation and search through the source code:

In this section:

See Also

Language and Framework-Specific Guidelines:

Last modified: 11 July 2016