Skip to content

Commit

Permalink
add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Jul 26, 2024
1 parent 1f102f8 commit 7dd9e6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/kernels/raw/finder/localKnownPathKernelSpecFinder.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export class LocalKnownPathKernelSpecFinder
private async listKernelSpecs(cancelToken: CancellationToken): Promise<LocalKernelSpecConnectionMetadata[]> {
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));
Expand All @@ -105,6 +107,7 @@ export class LocalKnownPathKernelSpecFinder
this._onDidChangeKernels.fire();
this.writeKernelsToMemento();
}
logger.trace(`ListKernelSpecs.final ${JSON.stringify(newKernelSpecs)}`);
return newKernelSpecs;
};
const promise = fn();
Expand All @@ -114,6 +117,7 @@ export class LocalKnownPathKernelSpecFinder
private async findKernelSpecs(cancelToken: CancellationToken): Promise<LocalKernelSpecConnectionMetadata[]> {
// 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 [];
Expand Down

0 comments on commit 7dd9e6f

Please sign in to comment.