javascript - Setting breakpoints on function calls in Chrome Dev. Mode -


is there way set breakpoints when specific functions about execute?

it needn't explicit breakpoint - want execution pause when console.log() called.

or should resort this method.

i prefer accomplish without modifying code, or manually setting breakpoints @ every console.log.

yes that's trick. create custom logging function, put debugger in , call console.log , have wanted:

function log(message) {     debugger;     console.log(message) ; } 

edit:

you can replace console.log similar fonction calls original:

var clog = console.log; console.log = function(message) {     if(message == '...') {         debugger;     }     clog.apply(console, arguments); } 

this code affect log calls within page. check catch message. remove stop always.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -