最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Hide chrome-extension: in "Developer Tools" Scripts tab - Stack Overflow

programmeradmin4浏览0评论

When I debug javascript-code in Chrome I use the Scripts tab in the Developer tools. In the list of scripts(the drop-down) a lot of extensions are listed on this form:

  • chrome-extension://lfhsdjklfhaslkfhuwklshdfjkash/path/to/script.js
  • chrome-extension://lfhsdjklfhaslkfhuwklshdfjkash/path/to/another/script.js
  • and so on

I've got around 20-30 such lines and that is pretty annoying when I just want to see my own scripts.

Is it possible to hide these lines but keep the scripts from the current web page?

When I debug javascript-code in Chrome I use the Scripts tab in the Developer tools. In the list of scripts(the drop-down) a lot of extensions are listed on this form:

  • chrome-extension://lfhsdjklfhaslkfhuwklshdfjkash/path/to/script.js
  • chrome-extension://lfhsdjklfhaslkfhuwklshdfjkash/path/to/another/script.js
  • and so on

I've got around 20-30 such lines and that is pretty annoying when I just want to see my own scripts.

Is it possible to hide these lines but keep the scripts from the current web page?

Share Improve this question edited Jun 29, 2011 at 8:42 Peter Jaric asked Jun 29, 2011 at 8:20 Peter JaricPeter Jaric 5,3023 gold badges33 silver badges42 bronze badges 5
  • These are content scripts injected by extensions, I am not sure if there is any way to hide them ... since these scripts are technically part of the page too ... – Madhur Ahuja Commented Jun 29, 2011 at 8:45
  • @Madhur Ahuja: I am thinking that since Chrome itself is aware of this there might exist some setting or button somewhere that removes them from view. – Peter Jaric Commented Jun 29, 2011 at 8:47
  • 3 You can try running chrome in incognito mode which will disable the extensions .. this might solve your problem – Madhur Ahuja Commented Jun 29, 2011 at 8:48
  • @Madhur Ahuja: Yes, that could work in some situations. Thanks. – Peter Jaric Commented Jun 29, 2011 at 9:00
  • What if I don't want to remove the extensions and yet still hide their stuff from developer tools. For example, I use a jquery inspector that's helpful and an anuglar.js debugger that is also helpful. Both of these, however, put a plethora of items into the inspector. I thought there use to be a way to "disable extension input" or something of the sort in the developer tools options. Anyone have any insight on this? – Tim Commented Dec 29, 2015 at 5:38
Add a ment  | 

2 Answers 2

Reset to default 8

Chrome now has built in user profile support. Create yourself a new profile with the extensions you need: https://support.google./chrome/answer/2364824?hl=en

The first option will be to disable all your extensions... not so cool...

If you find the chrome-extensions scripts very irritating, you can create yourself a developer profile with no extensions (or a minimal set of extensions) for debugging your scripts. Explanation for windows:

  • Duplicate your "Google Chrome" shortcut (by ctrl+dragging it)
  • Rename the new shortcut to "Chrome Dev Profile".
  • Right click it -> Properties
  • (Choose a path for your profile dir. You don't need to create it. For example: c:\users\udi\profiles\chromedevprofile )
  • Add to the "Target" field, following the path to chrome.exe:

    --user-data-dir=c:\users\udi\profiles\chromedevprofile (with your path of course).

  • Launch it (and grab a coffee or wait a minute or so for the hamsters).

  • Now you have a second chrome profile running. You will see there is no history, bookmarks, extensions etc. Don't panic, you still have all of them in your normal profile.
  • Optional: You would probably want to change the way this chrome looks to get a bit confused. Install a theme from here: https://tools.google./chrome/intl/en/themes/index.html
  • Use this profile for debugging. :-)
  • (You can also keep your debugging bookmarks in the bookmark toolbar for easy access without disturbing your regular bookmarks toolbar. Same for debugging oriented extensions.)

(I think the question isn't accurate/relevant today; it's been almost five years. I don't see a “Scripts tab” on my Chromium, and there is no drop-down for scripts in the Sources tab. In fact, “sources” and “content scripts” appear now separately in Sources, and that probably solves the original issue.)

I stumbled upon this question looking for something very similar, and I had to figure out the solution, so I'm sharing it for those who arrive here like me:

How to hide extensions in the Network tab:

Use the filter text field to exclude extension scripts. Three ideas:

  • larger-than:1 (best solution).
  • If all the resources you care about share protocol: scheme:https or scheme:http.
  • If all the resources you care about e from the same type of TLD: domain:*. (eg).

发布评论

评论列表(0)

  1. 暂无评论