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
Post a Comment