home
  • Blog
5.11
  • Introduction
  • Getting Started
  • Tutorial
  • Core Concepts
  • Components
  • Routing
  • Services
  • EmberData
  • In-Depth Topics
  • Application Development
  • Application Concerns
  • Accessibility
  • Configuration
    • Configuring Your App
    • Configuring Ember CLI
    • Handling Deprecations
    • Disabling Prototype Extensions
    • Specifying the URL Type
    • Embedding Applications
    • Feature Flags
    • Optional Features
    • Build targets
    • Debugging
  • Testing
  • Addons and Dependencies
  • Using TypeScript
  • Developer Tools
  • Ember Inspector
  • Code Editors
  • Additional Resources
  • Upgrading
  • Contributing to Ember.js
  • Glossary
Old Guides - You are viewing the guides for Ember v5.11.0.
Go to v6.3.0

Debugging


Ember provides a browser extension and several configuration options to help you debug your application.

Ember Inspector

The Ember Inspector is a browser extension that makes it easy to understand and debug your Ember.js application. To learn more, check out the dedicated guide.

Routing

Log router transitions

app/app.js
import Application from '@ember/application';

export default class App extends Application {
  // Basic logging, e.g. "Transitioned into 'post'"
  LOG_TRANSITIONS = true;

  // Extremely detailed logging, highlighting every internal
  // step made while transitioning into a route, including
  // `beforeModel`, `model`, and `afterModel` hooks, and
  // information about redirects and aborted transitions
  LOG_TRANSITIONS_INTERNAL = true;
}

Views / Templates

Log view lookups

config/environment.js
ENV.APP.LOG_VIEW_LOOKUPS = true;

Controllers

Log generated controller

config/environment.js
ENV.APP.LOG_ACTIVE_GENERATION = true;

Miscellaneous

Turn on resolver resolution logging

This option logs all the lookups that are done to the console. Custom objects you've created yourself have a tick, and Ember generated ones don't.

It's useful for understanding which objects Ember is finding when it does a lookup and which it is generating automatically for you.

app/app.js
import Application from '@ember/application';

export default class App extends Application {
  LOG_RESOLVER = true;
}

Dealing with deprecations

In addition to what is described in the Handling Deprecations guide, you can turn on the following settings:

Ember.ENV.RAISE_ON_DEPRECATION = true;
Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION = true;

Implement a window error event listener to log all errors in production

app/app.js
import fetch from 'fetch';
// ...
window.addEventListener('error', function(error) {
  fetch('/error-notification', {
    method: 'POST',
    body: JSON.stringify({
      stack: error.stack,
      otherInformation: 'exception message'
    })
  });
});

Errors within Ember.run.later Backburner

Backburner.js has support for stitching the stacktraces together so that you can track down where an error thrown by Ember.run.later is being initiated from. Unfortunately, this is quite slow and is not appropriate for production or even normal development.

To enable full stacktrace mode in Backburner, and thus determine the stack of the task when it was scheduled onto the run loop, you can set:

app/app.js
import { run } from '@ember/runloop';

run.backburner.DEBUG = true;

Once the DEBUG value is set to true, when you are at a breakpoint you can navigate back up the stack to the flush method in and check the errorRecordedForStack.stack value, which will be the captured stack when this job was scheduled.

left arrow
Build targets
We've finished covering Configuration. Next up: Testing - Introduction
right arrow
On this page

  • Ember Inspector
  • Routing
  • Log router transitions
  • Views / Templates
  • Log view lookups
  • Controllers
  • Log generated controller
  • Miscellaneous
  • Turn on resolver resolution logging
  • Dealing with deprecations
  • Implement a window error event listener to log all errors in production
  • Errors within Ember.run.later Backburner
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2025 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue Created with Sketch.