How do I force a breakpoint in JavaScript code on event (i.e. on button click) ?
I am using Google Chrome.
Are there any browser compatibility issues that might come with it?
How do I force a breakpoint in JavaScript code on event (i.e. on button click) ?
I am using Google Chrome.
Are there any browser compatibility issues that might come with it?
Set up a button click listener and call the debugger;
Example
$("#myBtn").click(function() {
debugger;
});
Demo
Resources on debugging in JavaScript