mirror of
https://git.mirrors.martin98.com/https://github.com/cilame/v_jstools
synced 2025-08-14 11:45:58 +08:00
add
This commit is contained in:
parent
e2d77be123
commit
4743fa6e70
@ -55,7 +55,10 @@ chrome.debugger.onEvent.addListener(function (source, method, params){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
var attached = false;
|
chrome.debugger.onDetach.addListener(function(){
|
||||||
|
attached = false
|
||||||
|
})
|
||||||
|
var attached = false
|
||||||
function AttachDebugger() {
|
function AttachDebugger() {
|
||||||
if (attached){ return }
|
if (attached){ return }
|
||||||
attached = true
|
attached = true
|
||||||
@ -64,7 +67,6 @@ function AttachDebugger() {
|
|||||||
function (tabs) {
|
function (tabs) {
|
||||||
var tab = { tabId: tabs[0].id };
|
var tab = { tabId: tabs[0].id };
|
||||||
chrome.debugger.attach(tab, "1.2", function () {
|
chrome.debugger.attach(tab, "1.2", function () {
|
||||||
console.log('attached debugger.')
|
|
||||||
sendCommand("Fetch.enable", { patterns: [
|
sendCommand("Fetch.enable", { patterns: [
|
||||||
{urlPattern:"*",resourceType:"Script",requestStage:"Response"} // 监听类型,目前主要监听 Script
|
{urlPattern:"*",resourceType:"Script",requestStage:"Response"} // 监听类型,目前主要监听 Script
|
||||||
] }, tab);
|
] }, tab);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user