How to disable chrome extensions JS when debugging in devtools?

后端 未结 3 556

When I add mouse event breakpoint, devtools always jump into extension\'s JS.

Is there any way to point to my mouse event code directly?

3条回答
  •  一整个雨季
    2021-01-31 18:09

    The only way to disable the script (e.g. to avoid side-effects) is by disabling the extension (for instance, by using incognito mode if the extension is not enabled in incognito mode).

    If you don't mind the scripts to run, but want to ignore extension code, then you can use the script blackboxing feature of Chrome's devtools.

    If you never develop extensions and aren't interested in stepping through it, then open the settings menu of the devtools, click on Blackboxing and then the "Blackbox content scripts" checkbox:

    If you only want to selectively ignore files, then you can also right-click on the source of the file that you want to ignore, and click on the "Blackbox Script" contextmenu option. To remove the pattern, go to the "Blackboxing" settings panel as shown before.

提交回复
热议问题