Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop a JavaScript program that is being debugged in Chrome?

Ok, I've fired up my debugger in Chrome and I've placed a breakpoint just before an Ajax call to examine the variables on the stack. Hmmm, I notice that one of them is not right. At this point I'd like to stop the JavaScript program from continuing executing (and not making the Ajax request). Is there anyway to do this short of closing the tab?

like image 275
Philip Murphy Avatar asked Aug 11 '26 18:08

Philip Murphy


1 Answers

In Chrome's Developer Tools you can modify your JavaScript and comment out the part that will trigger the Ajax request. See JavaScript Editing on https://github.com/borismus/DevTools-Lab/raw/master/cheatsheet/chromedev-cheatsheet.png

like image 143
Andrew Kolesnikov Avatar answered Aug 14 '26 10:08

Andrew Kolesnikov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!