[英]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. 好吧,我已经在Chrome中启动了我的调试器,我在Ajax调用之前放置了一个断点来检查堆栈上的变量。 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). 此时我想停止JavaScript程序继续执行(而不是发出Ajax请求)。 Is there anyway to do this short of closing the tab? 无论如何还没有关闭标签吗?
In Chrome's Developer Tools you can modify your JavaScript and comment out the part that will trigger the Ajax request. 在Chrome的开发人员工具中,您可以修改JavaScript并注释掉将触发Ajax请求的部分。 See JavaScript Editing on https://github.com/borismus/DevTools-Lab/raw/master/cheatsheet/chromedev-cheatsheet.png 请参阅https://github.com/borismus/DevTools-Lab/raw/master/cheatsheet/chromedev-cheatsheet.png上的 JavaScript编辑
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.