通过浏览器禁用调试器语句 [英] Disable the debugger statement through the browser

查看:202
本文介绍了通过浏览器禁用调试器语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一段包含调试器关键字的代码。
我正在使用调试窗口(IE,FF,Opera)来查看CSS样式效果,但每次刷新页面时调试器都会停止(应该这样)。



我是否可以通过浏览器切换或禁用调试器关键字(而不是从我的代码中删除它),这样我就可以做到我想要的样式而不会在每次刷新页面时困扰我?

  myApp.service('User',['$ localStorage',function($ localStorage){
debugger;
this。$ storage = $ localStorage;
}]);

谢谢




I am trying to style a piece of code that has the debugger keyword in it. I am using the debugging window(IE, FF, Opera) to see CSS style effects but the debugger is stopping every time I refresh the page(as it should).

Can I toggle or disable the debugger keyword through the browser(not by deleting it from my code) so I could do the style I want without it bothering me every time I refresh the page?

myApp.service('User', ['$localStorage', function ($localStorage) {
    debugger;
    this.$storage = $localStorage;
}]);

Thanks

The debugger statement

解决方案

You can now select "Never pause here" from the menu after right-clicking on a line number. It will prevent Chrome from pausing on the debugger statement.

这篇关于通过浏览器禁用调试器语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆