浏览代码

Check for debugging enabled when setting the session

Jeremy Tuloup 5 年之前
父节点
当前提交
2dba59a8aa
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/index.ts

+ 3 - 1
src/index.ts

@@ -80,7 +80,9 @@ async function setDebugSession(
   } else {
     debug.session.client = client;
   }
-  await debug.restoreState(true);
+  if (debug.isDebuggingEnabled) {
+    await debug.restoreState(true);
+  }
   app.commands.notifyCommandChanged();
 }