const detachDebugger = () => { chrome.debugger.getTargets((tabs) => { console.log(tabs) for (const tab in tabs) { if (tabs[tab].attached && tabs[tab].tabId) { chrome.debugger.detach({ tabId: tabs[tab].tabId }) } } }) } export default detachDebugger