Search code examples
javascriptember.jsgoogle-chrome-devtoolsember-cli

Debugging Ember JS -- Identifying line in code that causes an error


So I'm getting the following error:

Uncaught Error: Assertion Failed: The key provided to get must be a string, you passed undefined

Should be easy enough to fix, if there was any indication of the line in my code that causes that error.

Using the chrome console, I click on ember.debug.js:6254 next to the error, which just shows me the ember code that throws the error. I can expand the error, but I just get a bunch of functions that can't be clicked on and no indication where they come from.

Can someone please help me figure out how to identify the line in my Ember code that is causing the error.


Solution

  • This should be a comment but I can't, so here goes: Iam new to Ember and have been spending quite a long time debugging. Remember that long stack of function calls that chrome's console shows. Look for anything other than ember.debug.js...especially those marked (anonymous function) and files with names vendor.js or app-name.js