Browse Source

Check for debugging enabled when setting the session

Jeremy Tuloup 5 years ago
parent
commit
2dba59a8aa
1 changed files with 3 additions and 1 deletions
  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();
 }