Troubleshooting Dart Editor

Find solutions to Dart Editor problems for , , or . If we missed something, please let us know.

Contents

  1. Getting your system architecture
  2. Launching Dart Editor
  3. Launching Dartium
  4. Increasing memory
  5. Using Eclipse
  6. Running "pub get" behind a firewall
  7. Breakpoints not triggering
  8. Clearing all settings
  9. Collecting performance diagnostics
  10. Other known issues

Getting your system architecture

If you don't know whether you have 32-bit or 64-bit Linux, use the command uname -a. If 64 is in the output, you have 64-bit Linux; otherwise, you have 32-bit Linux.

Almost all Mac OS X systems have a 64-bit OS, so we recommend using the 64-bit Dart Editor. If you encounter problems, try the 32-bit version.

If you don't know whether you have 32-bit or 64-bit Windows, see Microsoft's support site.

Launching Dart Editor

Your Java version should have the same bit width as your Dart Editor version. For example, if you're using a 64-bit Dart Editor, then you should use 64-bit Java. Otherwise, you might see a message like this when you try to launch Dart Editor:

    Failed to load the JNI shared library "C:\Program Files(x86)\Java\jre6\\bin\client\jvm.dll
    

You can find the bit width of your default Java version using the command java -version.

If you're using 64-bit Linux but have 32-bit Java libraries, Dart Editor won't work.

The fix: Use a 64-bit Java JDK. You can get a 64-bit JDK 7 from Java SE Development Kit 7 Downloads. If you already have a 64-bit JDK but it's not the default, you can specify the Java runtime.

A few things can go wrong when launching Dart Editor on a Mac:

Unidentified developer

If you're running Mac OS 10.8 (Mountain Lion), your computer might refuse to start Dart Editor because it's not from the Mac App Store or an identified developer. Until we fix this problem (bug #5088), you can work around it.

Dialog text: DartEditor can't be opened because it is from an unidentified developer.

The easiest workaround: When launching Dart Editor for the first time, don't double-click the Dart Editor icon. Instead, right-click (or Ctl+click) it to bring up a context menu, and choose Open. Then, in the dialog that comes up, click Open.

An alternative workaround is to change your security settings. Go to System Preferences > Security & Privacy. In the General tab under Allow applications downloaded from:, choose Anywhere. You should now be able to start Dart Editor. Once you've run Dart Editor, you can change the preference back to its previous setting.

"DartEditor.app" is damaged (64-bit only)

Sometimes when you try to launch a new, 64-bit build of Dart Editor, Mac OS X incorrectly displays a corruption warning:

"DartEditor.app" is damaged and can't be opened. You should move it to the Trash.

The workaround is to download and install the 32-bit version of Dart Editor.

Java installation failure

When you try to run Dart Editor but don't have a Java SE 6 runtime, Dart Editor offers to install Java for you. If the installation doesn't work, you can either restart Dart Editor or install Java yourself.

Slow startup

If you use Sophos Anti-Virus, Dart Editor (like most Java applications) starts up 10-15 times slower than normal.

The fix: Turn off scanning of the app's JAR files. For example:

  1. In Sophos Anti-Virus preferences, choose On-access Scanning.
  2. If the preferences are locked, click the lock and enter your password.
  3. Click Excluded Items and then the + sign.
  4. Navigate to the directory that contains DartEditor.
  5. Search for files under that directory with names that end in .jar.
  6. Select all these .jar files, and click Open.

32-bit Mac

If you're using one of the increasingly rare 32-bit Macs, you can't launch the 64-bit version of Dart Editor. Instead, you see a warning like this:

Dialog text: You can't open the application DartEditor.app because it's not supported on this type of Mac.

The fix: Download and install the 32-bit version of Dart Editor.

Specifying the Java runtime

If necessary, you can specify the Java runtime that Dart Editor uses. Go to your Dart installation directory and add the following two lines to DartEditor.ini immediately before the existing ‑vmargs line:

-vm
  /full/path/to/java
  

Important: On Windows, use double backslashes (\\) as the directory separator:

-vm
    c:\\bin\\java_jdk1.7.0\\bin\\javaw.exe
    

For example, DartEditor.ini might have:

...
  -vm
  /usr/local/buildtools/java/jdk-64/bin/java
  -vmargs
  ...
  

Increasing memory

When building larger Dart applications, Dart Editor needs more memory for analysis. If you are not already using 64-bit, switch to a 64-bit Java Virtual Machine (JVM), and to the 64-bit version of Dart Editor. In the DartEditor.ini file, find the -Xmx1000m string and change it to -Xmx2000m, or larger if you have more RAM available.

Java 7 garbage collection changes

Java 7 sports different garbage collection (GC) behavior than Java 6. If you see large pauses when editing files, and you have addressed the memory issues, edit the DartEditor.ini file, and insert a line after -vmargs that contains the string -Xincgc.

Launching Dartium

By default, when you click Dart Editor's Run button Run, your web app runs in Dartium. If you instead see a message that you need to download a new version of Dartium, your software is old.

The fix: Download and install a new version of Dart Editor. You'll get an updated version of Dartium, plus the latest improvements to Dart Editor. Alternatively, download a new version of Dartium and substitute it for the copy that's in your Dart installation directory.

Using Eclipse

If Dart Editor and Eclipse share the same workspace directory, they'll save conflicting settings, resulting in warnings and errors from both Dart Editor and Eclipse.

The fix: Don't use the same workspace for Dart Editor and any other Eclipse-based software.

Running "pub get" behind a firewall

When using pub get behind a firewall, you may see http and socket (connection) errors when the command attempts to pull down dependencies from an external website, such as pub.dartlang.org.

You can fix this by setting the environment variables http_proxy, https_proxy, and no_proxy. In the following examples, replace 9090 with the appropriate port for your proxy:

  http_proxy=http://<yourproxy>.<yourdomain>.com:9090/
  https_proxy=https://<yourproxy>.<yourdomain>.com:9090/
  no_proxy=localhost,127.0.0.0/8
  
If your proxy needs authentication, the setup will look more like the following:
  http_proxy=http://<username>:<password>@<yourproxy>.<yourdomain>.com:9090/
  https_proxy=https://<username>:<password>@<yourproxy>.<yourdomain>.com:9090/
  

To enable Dart Editor to check for updates, add the following to the DartEditor.ini file:

  -Dhttp.proxyHost=<yourproxy>.<yourdomain>.com
  -Dhttp.proxyPort=9090
  -Dhttps.proxyHost=<yourproxy>.<yourdomain>.com
  -Dhttps.proxyPort=9090
  

If you need a user name and password for authentication, add:

  -Dhttp.proxyUser=<username>
  -Dhttp.proxyPassword=<passwordstring>
  -Dhttps.proxyUser=<username>
  -Dhttps.proxyPassword=<passwordstring>
  

Breakpoints not triggering

If your breakpoints are not being triggered, or you are seeing "Source not found" errors inside of Dart Editor, check to make sure that Speed Tracer and WebGL Inspector are turned off.

Clearing all settings

Dart Editor settings are in a platform-dependent directory, so you don't lose them when you update Dart Editor. If your settings become corrupted or you want to see the new user experience, delete the settings directory.

The following table shows where Dart Editor settings are saved.

Platform Location of settings
Windows    <user's home directory>\DartEditor
Linux $HOME/.dartEditor
Mac $HOME/Library/Application Support/DartEditor

Collecting performance diagnostics

To aid in debugging Dart Editor performance issues, you can generate a heap dump.

For Linux or Mac users:

Use top to get the pid of Dart Editor. Then, run jstack <pid>. If the given process is running on a 64-bit VM, you may need to specify a -J-d64 option. Please attach the output to the relevant bug at dartbug.com.

More information on jstack is available.

Other known issues

Some of the more common problems on Linux include:

Dart Editor issues lists all of the known bugs in Dart Editor.

Click an issue's star to receive updates about it. You can also file new issues and add comments to existing ones.