Procházet zdrojové kódy

Merge pull request #518 from jtpio/optional-kernelspecs

Make kernelspecs optional for DebuggerService
Afshin Taylor Darian před 4 roky
rodič
revize
aa51408fcb
1 změnil soubory, kde provedl 7 přidání a 4 odebrání
  1. 7 4
      src/service.ts

+ 7 - 4
src/service.ts

@@ -147,6 +147,9 @@ export class DebuggerService implements IDebugger, IDisposable {
    * @param connection The session connection.
    */
   async isAvailable(connection: Session.ISessionConnection): Promise<boolean> {
+    if (!this._specsManager) {
+      return true;
+    }
     await this._specsManager.ready;
     const kernel = connection?.kernel;
     if (!kernel) {
@@ -665,13 +668,13 @@ export namespace DebuggerService {
     config: IDebugger.IConfig;
 
     /**
-     * The kernel specs manager.
+     * The optional debugger sources instance.
      */
-    specsManager: KernelSpec.IManager;
+    debuggerSources?: IDebugger.ISources;
 
     /**
-     * The debugger sources instance.
+     * The optional kernel specs manager.
      */
-    debuggerSources?: IDebugger.ISources;
+    specsManager?: KernelSpec.IManager;
   }
 }