简体   繁体   English

如何停止在Chrome中调试的JavaScript程序?

[英]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.

相关问题 如何停止执行 JavaScript 程序 - How to stop execution of a JavaScript program 如何强制Chrome调试器自动转到当前已调试的行? - How to force Chrome debugger to automatically go to the currently debugged line? 如何在javascript中使用“throw”停止程序执行? - How to stop a program execution with "throw" in javascript? 如何使用 JavaScript 检查 Chrome 中正在使用网络摄像头 - How to check with JavaScript that webcam is being used in Chrome 如何停止关注新选项卡(由外部程序打开) - How to stop the focus on a new tab (which is being opened by an external program) 如何在iOS for Chrome或Safari上停止滚动 - CSS / JavaScript或jQuery - How to stop scrolling in general on iOS for Chrome or Safari - CSS/ JavaScript or jQuery 如何停止Javascript中的Firefox和chrome浏览器调整大小? - How do I stop browser resize of firefox and chrome in Javascript? 如何停止60秒计时器“跳动”(css / javascript) - How to stop 60 second timer from being “jumpy” (css/javascript) 如何阻止javascript的后半部分被调用? - How to stop the latter part of javascript from being called? 如何停止其余代码的执行-javascript - How to stop the rest of the code from being executed - javascript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM