Disable the debugger statement through the browser

前提是你 提交于 2019-11-28 07:56:11

问题


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


回答1:


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.




回答2:


You should delete the debugger when it's not being used. It should only be used in the lines of code you are currently testing.... There's no reason to have it in your code when you're not testing the code directly before or after the debugger.




回答3:


f10 => for pass step by step line

f8 => for pass to another debugger

you can see all styles in chrome performance tab without handling javascript issues

chrome>> inspect(f12) > performance > reload



来源:https://stackoverflow.com/questions/26569955/disable-the-debugger-statement-through-the-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!