|
@@ -1,5 +1,5 @@
|
|
|
import browser from 'webextension-polyfill';
|
|
|
-import { getBlockConnection } from '../helper';
|
|
|
+import { getBlockConnection, attachDebugger } from '../helper';
|
|
|
|
|
|
async function activeTab(block) {
|
|
|
const nextBlockId = getBlockConnection(block);
|
|
@@ -36,6 +36,11 @@ async function activeTab(block) {
|
|
|
};
|
|
|
this.windowId = tab.windowId;
|
|
|
|
|
|
+ if (this.settings.debugMode) {
|
|
|
+ await attachDebugger(tab.id, this.activeTab.id);
|
|
|
+ this.debugAttached = true;
|
|
|
+ }
|
|
|
+
|
|
|
if (this.preloadScripts.length > 0) {
|
|
|
const preloadScripts = this.preloadScripts.map((script) =>
|
|
|
this._sendMessageToTab(script)
|