This is a short post collecting some helpful debugging tools built into Ember or how you could easily implement some yourself.
You should include these few lines of code in every Ember App. I learned about those lines in the Blog of Ian Petzer. This snippet logs all exceptions that are thrown when resolving or rejecting promises. If you do not include this snippet, all exceptions will be swallowed silently and may leave you very irritated...
It is quite often that you will start your app and see no exceptions in the console, but you won’t see the desired result in the browser also. How to go about this? There may be a minor error in your template or the connected controller does not carry the right data. How to analyze this kind of error? As the Ember Contributors deeply care about usability, they are developing an extension for Chrome, which facilitates this kind of debugging. With this extension you can inspect DOM elements with one click and see the associated View and Controller. You can already install this extension, but it is not officially released yet. Alternatively you can mirror this functionality manually in the browser console. How to do that?
Your new post is loading...