# Access ENV object from the console

**URL:** <https://discuss.emberjs.com/t/access-env-object-from-the-console/14550>\
**Category:** Questions\
**Created:** [April 16, 2018, 12:44pm UTC](https://discuss.emberjs.com/t/access-env-object-from-the-console/14550 "2018-04-16T12:44:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulyoder](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/paulyoder/32/9797_2.png) [@paulyoder](https://discuss.emberjs.com/u/paulyoder)\
**Post date:** [April 16, 2018, 12:44pm UTC](https://discuss.emberjs.com/t/access-env-object-from-the-console/14550/1 "2018-04-16T12:44:32Z")

</div>

I’m trying to debug an issue with a setting value on the `ENV` object set in the `environment.js` file but I don’t know how to access the `ENV` object from the console.

I see that `EmberENV` object is available, but the setting I’m looking at is on the `ENV.APP` object.

For example, I’m trying to see the value for the `ENV.APP.mySetting` property below:

```javascript
let ENV = {
  ...
  APP: {
    mySetting: 'someValue'
  }
}

```

What’s the easiest way to see that setting from the console?

---

<div class="post-metadata">

**Author:** ![backspace](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/backspace/32/9927_2.png) [@backspace](https://discuss.emberjs.com/u/backspace)\
**Post date:** [April 16, 2018, 12:56pm UTC](https://discuss.emberjs.com/t/access-env-object-from-the-console/14550/2 "2018-04-16T12:56:13Z")

</div>

I’m curious about this myself; when I wanted to do this last week, I resorted to looking at the `index.html` file and fishing through the confusing serialised form. It works, but it’s subpar.

If that hadn’t worked for me, I’d have imported the configuration into a class file and saved it on `window` 😬

---

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [April 16, 2018, 1:18pm UTC](https://discuss.emberjs.com/t/access-env-object-from-the-console/14550/3 "2018-04-16T13:18:48Z")

</div>

```nohighlight
require('<your apps modulePrefix>/config/environment').default;

```

So assuming you have an app whose `modulePrefix` is `travis` ([😉](https://github.com/travis-ci/travis-web/blob/d675b33e75cc6362b42f27dd77703d54cbe5a887/config/environment.js#L6)) you would do:

```nohighlight
require('travis/config/environment').default

```

![screenshot of travis-web](http://assets.rwjblue.com/snapshots/2018-04-16_09-17-48_ysjg9_Travis_CI_-_Test_and_Deploy_Your_Code_with_Confidence.image.png)
