本文翻译自:How to disable JavaScript in Chrome Developer Tools?

I am trying to debug the features of a website when users disable their JavaScript. 我试图在用户禁用JavaScript时调试网站的功能。 I was wondering how do you disable JavaScript for a page from the Google Chrome DevTools? 我想知道如何从Google Chrome DevTools中禁用页面的JavaScript?


#1楼

参考:https://stackoom/question/uFLr/如何在Chrome开发者工具中禁用JavaScript


#2楼

单击Developer Tools一角的菜单,单击Settings,然后选中Debugger下的Disable Javascript


#3楼

chrome://chrome/settings/content Javascript / Manage Exceptions


#4楼

You can also run Chrome with JavaScript disabled by default by using the flag: 您也可以使用以下标志默认情况下禁用启用了Chrome的Chrome:

-disable-javascript

You would use this for example by running Chrome like this: 您可以使用此方法,例如运行Chrome,如下所示:

C:\Documents and Settings\%username%\Local Settings\Application Data\Google\Chrome" -disable-javascript

#5楼

这个扩展使它更快: 快速Javascript切换器


#6楼

On Mac OS X: 在Mac OS X上:

  • Preferences 喜好
  • Show advanced settings 显示高级设置
  • Press the "content settings" button 按“内容设置”按钮
  • Scroll to the "JavaScript" section 滚动到“JavaScript”部分
  • Check the checkbox in front of "Do not allow any site to run JavaScript" 选中“不允许任何网站运行JavaScript”前面的复选框

The Chrome Quick JavaScript Switcher extension is a lot easier though :-) Chrome Quick JavaScript Switcher扩展程序虽然容易得多:-)

更多推荐

如何在Chrome开发者工具中禁用JavaScript?