Setting environment variables in Dartium from WebStorm

138 views
Skip to first unread message

Shams Zakhour

unread,
Jun 12, 2015, 3:10:39 AM6/12/15
to jetbrains-dart...@dartlang.org
I need to set the DART_FLAGS environment variable in WebStorm. Observatory requires some environment variables to be set on launch in Dartium.

I haven't been able to get it to work.

In WebStorm, I go to

Preferences > Languages & Frameworks > Dart.

I click the Settings... button to the right of the Dartium path.

I enter the variables, as shown in the attached image.
(I've tried other variations, also without success.)

When I launch the app, it ignores the variables I've tried to set and gives me two tabs in Dartium. One tab is the app's tab. The other one looks like that attached image.
Screen Shot 2015-06-09 at 1.06.19 PM.png
Screen Shot 2015-06-09 at 1.07.31 PM.png

Alexander Doroshko

unread,
Jun 15, 2015, 7:22:18 AM6/15/15
to jetbrains-dart...@dartlang.org
Command line options and environment variables are different things.
WebStorm doesn't have UI to manipulate browser env vars because nobody asked so far. But the model inside IDE is there, so there is a hacky way to do it:
- close IDE
- find [IDE Configuration folder]/options/web-browsers.xml file (see here how to locate [IDE Configuration folder])
- this file should already contain Dartium entry, you can edit it and add more env vars.
    <browser id="bfee1b69-a97d-4338-8ba4-25170adcbaa6" name="Dartium" family="CHROME" path="C:/dart/dart-1.10/chromium/chrome.exe">
      <settings>
        <environment-variables>
          <entry key="DART_FLAGS" value="--checked" />
        </environment-variables>
      </settings>
    </browser>
--
You received this message because you are subscribed to the Google Groups "Dart plugin for JetBrains Editors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jetbrains-dart-plugi...@dartlang.org.

Reply all
Reply to author
Forward
0 new messages