Break when a function is called
suggest changeIn the browser console, debug is a DevTools helper, not a JavaScript statement. Pass a function reference:
debug(functionName);
The next time that function runs, the debugger pauses on its first line, and it keeps pausing on every call until you run undebug(functionName). The function does not have to be declared with a name; you need a reference to it.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents