I looked at previous question and went through the Event Listeners Tab and then clicked the Framework Listeners checkbox but it still doesn't show Backbone listeners.
-
Did you go to Event Listeners Breakpoints? In there, you can find all types of events you can click on all of them and run the debugger and see them trigger. – Diego Gallegos May 04 '16 at 23:51
-
@DiegoGallegos it has all the events that can happen, but I'm looking for Backbone specific events like change events – akantoword May 05 '16 at 18:15
1 Answers
In Chrome Dev Tools, you can use the Event Listener Breakpoints
panel under Sources to break on certain events, for example click
:
You can then step through the code and follow the Call Stack to determine where problems may exist. If you find yourself stepping into external library code, you can right click on it to blackbox it:
Alternatively, there is a good blog post below that shows a technique of writing out stack traces and overriding the Backbone trigger
function to inject a trace function before returning the result of the original Backbonetrigger
function: http://lifeinvistaprint.com/techblog/debugging-backbone-chrome/
I documented this kind of technique for general debugging on my blog recently: https://gideonpyzer.com/blog/debugging-javascript-by-redefining-functions/
There is also a Backbone Debugger Chrome Extension, which may be of use to you.

- 22,610
- 7
- 62
- 68