|
@@ -65,17 +65,8 @@ export function attachDebugger(tabId, prevTab) {
|
|
|
if (prevTab && tabId !== prevTab)
|
|
|
chrome.debugger.detach({ tabId: prevTab });
|
|
|
|
|
|
- chrome.debugger.getTargets((targets) => {
|
|
|
- targets.forEach((target) => {
|
|
|
- if (target.attached || target.tabId !== tabId) {
|
|
|
- resolve();
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- chrome.debugger.attach({ tabId }, '1.3', () => {
|
|
|
- chrome.debugger.sendCommand({ tabId }, 'Page.enable', resolve);
|
|
|
- });
|
|
|
- });
|
|
|
+ chrome.debugger.attach({ tabId }, '1.3', () => {
|
|
|
+ chrome.debugger.sendCommand({ tabId }, 'Page.enable', resolve);
|
|
|
});
|
|
|
});
|
|
|
}
|