From 7dd9e6f86bc01bd5101c2f7414d7904dacb81c5d Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 26 Jul 2024 13:51:24 +1000 Subject: [PATCH] add some logging --- src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts b/src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts index 41eb56b3619..f2b6bcdf3dc 100644 --- a/src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts +++ b/src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts @@ -80,7 +80,9 @@ export class LocalKnownPathKernelSpecFinder private async listKernelSpecs(cancelToken: CancellationToken): Promise { const fn = async () => { const newKernelSpecs = await this.findKernelSpecs(cancelToken); + logger.trace(`ListKernelSpecs ${JSON.stringify(newKernelSpecs)}`); if (cancelToken.isCancellationRequested) { + logger.trace(`isCancellationRequested`); return []; } const oldSortedKernels = Array.from(this._kernels.values()).sort((a, b) => a.id.localeCompare(b.id)); @@ -105,6 +107,7 @@ export class LocalKnownPathKernelSpecFinder this._onDidChangeKernels.fire(); this.writeKernelsToMemento(); } + logger.trace(`ListKernelSpecs.final ${JSON.stringify(newKernelSpecs)}`); return newKernelSpecs; }; const promise = fn(); @@ -114,6 +117,7 @@ export class LocalKnownPathKernelSpecFinder private async findKernelSpecs(cancelToken: CancellationToken): Promise { // Find all the possible places to look for this resource const paths = await this.jupyterPaths.getKernelSpecRootPaths(cancelToken); + logger.trace(`Paths to search ${JSON.stringify(paths.map((p) => p.fsPath))}`); if (cancelToken.isCancellationRequested) { logger.debug(`1. Stop searching for kernelspecs`); return [];