- Dart Cookbook
- Ivo Balbaert
- 549字
- 2021-08-05 17:42:44
Rapid Dart Editor troubleshooting
Dart Editor is based upon the Eclipse Integrated Development Environment (IDE), so it needs the Java VM to run. Sometimes, problems can arise because of this; if this is the case, be sure to consult the Dart Editor Troubleshooting page on the Dart website at https://www.dartlang.org/tools/editor/troubleshoot.html.
Getting ready
Some of the JVM settings used by Dart Editor are stored in the DartEditor.ini
file in the dart
installation directory. This typically contains the following settings (on a Windows system):
-data @user.home\DartEditor -vmargs -d64 -Dosgi.requiredJavaVersion=1.6 -Dfile.encoding=UTF-8 -XX:MaxPermSize=128m -Xms256m -Xmx2000m
Note
The line beneath –data
will read @user.home/.dartEditor
on a Linux system.
How to do it...
If you notice strange or unwanted behavior in the editor, deleting the settings
folder pointed to by –data
and its subfolders can restore things to normal. This folder can be found at different locations depending on the OS; the locations are as follows:
- On a Windows system,
C:\Users\{your username}\DartEditor
- On a Linux system,
$HOME/.dartEditor
- On an OS X system,
$HOME/Library/Application Support/DartEditor
Deleting the settings folder doesn't harm your system because a new settings folder is created as soon as you reopen Dart Editor. You will have to reload your projects though. If you want to save the old settings, you can rename the folder instead of just deleting it; this way, you can revert to the old settings if you ever want to.
How it works...
The settings for data points to the DartEditor
folder are in the users home directory, which contains various settings (the metadata) for the editor. Clearing all the settings removes the metadata the editor uses.
There's more...
The -d64 or –d32 value specifies the bit width necessary for the JVM. You can check these settings for your installation by issuing the command java –version
in a terminal session, whose output will be as follows:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
If this does not correspond with the –d
setting, make sure that your downloaded Dart Editor and the installed JVM have the same bit width, by downloading a JVM for your bit width.
Tip
If you work with many Dart projects and/or large files, the memory consumption of the JVM will grow accordingly and your editor will become very slow and unresponsive.
Working within a 32-bit environment will pretty much limit you to 1GB memory consumption, so if you see this behavior, it is recommended to switch to a 64-bit system (Dart Editor and JVM). You can then also set the value of the –Xmx
parameter (which is by default set to 2000m = 2 GB) to a higher setting, according to the amount of memory you have installed. This will visibly improve the loading and working speed of your editor!
If your JVM is not installed in the default location, you can add the following line to the .ini
file in the line before -vmargs
:
-vm /full/path/to/java
If you face a problem, it might be solved by upgrading Dart SDK and the Dart Editor to the latest version. In the Dart Editor menu, select Help and then About Dart Editor. If a new version is available, this will automatically download, and when done, click on Apply the update.
- Truffle Quick Start Guide
- 電子政務(wù)效益的經(jīng)濟分析與評價
- 5G承載網(wǎng)網(wǎng)絡(luò)規(guī)劃與組網(wǎng)設(shè)計
- 網(wǎng)絡(luò)故障現(xiàn)場處理實踐(第4版)
- 物聯(lián)網(wǎng)+BIM:構(gòu)建數(shù)字孿生的未來
- 無人機通信
- Windows Server 2003 Active Directory Design and Implementation: Creating, Migrating, and Merging Networks
- 信息通信網(wǎng)絡(luò)建設(shè)安全管理概要2
- 企業(yè)私有云建設(shè)指南
- Mastering Dart
- 網(wǎng)絡(luò)安全應(yīng)急響應(yīng)技術(shù)實戰(zhàn)指南
- 人人都該都懂的互聯(lián)網(wǎng)思維
- 云計算技術(shù)與標準化
- 人際網(wǎng)絡(luò)
- 物聯(lián)網(wǎng)技術(shù)與實踐