dart run

Run a Dart program

Options

NameDescription
-h, --helpPrint this usage information
--observe <port-or-address>The observe flag is a convenience flag used to run a program with a set of common options. Useful for debugging
--enable-vm-service <port-or-address>Enables the VM service and listens on the specified port for connections (default port number is 8181, default dind address is localhost)
--pause-isolates-on-exit, --no-pause-isolates-on-exitPause isolates on exit when running with --enable-vm-service
--pause-isolates-on-unhandled-exceptionsPause isolates when an unhandled exception is encountered when running with --enable-vm-service
--no-pause-isolates-on-unhandled-exceptionsDo not pause isolates when an unhandled exception is encountered when running with --enable-vm-service
--warn-on-pause-with-no-debuggerPrint a warning when an isolate pauses with no attahed debugger when running with --enable-vm-service
--no-warn-on-pause-with-no-debuggerDo not print a warning when an isolate pauses with no attahed debugger when running with --enable-vm-service
--pause-isolates-on-startPause isolates on start when running with --enable-vm-service
--no-pause-isolates-on-startDo not pause isolates on start when running with --enable-vm-service
--enable-assertsEnable assert statements
--no-enable-assertsDo not enable assert statements
--verbosity <verbosity-level>Sets the verbosity level of the compilation
-D, --define <key-value-pairs...>Define an environment declaration. To specify multiple declarations, use multiple options or use commas to separate key-value pairs. For example: dart compile aot-snapshot -D a=1,b=2 main.dart
--disable-service-auth-codesDisables the requirement for an authentication code to communicate with the VM service. Authentication codes help protect against CSRF attacks, so it is not recommended to disable them unless behind a firewall on a secure device
--enable-service-port-fallbackWhen the VM service is told to bind to a particular port, fallback to 0 if it fails to bind instead of failing to start
--namespace <path>The path to a directory that dart:io calls will treat as the root of the filesystem
--root-certs-file <path>The The path to a file containing the trusted root certificates to use for secure socket connections
--root-certs-cache <path>The path to a cache directory containing the trusted root certificates to use for secure socket connections
--trace-loadingEnables tracing of library and script loading
--enable-experiment <experiment>Enable one or more experimental features (see dart.dev/go/experiments