소스 검색

Merge pull request #518 from jtpio/optional-kernelspecs

Make kernelspecs optional for DebuggerService
Afshin Taylor Darian 4 년 전
부모
커밋
aa51408fcb
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  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;
   }
 }