diff --git a/src/client/datascience/jupyter/interpreter/jupyterCommand.ts b/src/client/datascience/jupyter/interpreter/jupyterCommand.ts index 567fefe25218..49e5a970bd82 100644 --- a/src/client/datascience/jupyter/interpreter/jupyterCommand.ts +++ b/src/client/datascience/jupyter/interpreter/jupyterCommand.ts @@ -224,6 +224,7 @@ export class InterpreterJupyterKernelSpecCommand extends InterpreterJupyterComma const defaultAction = () => { if (exception) { + traceError(`Exception attempting to enumerate kernelspecs: `, exception); throw exception; } return output; @@ -243,10 +244,12 @@ export class InterpreterJupyterKernelSpecCommand extends InterpreterJupyterComma try { if (args.join(' ').toLowerCase() === 'list --json') { // Try getting kernels using python script, if that fails (even if there's output in stderr) rethrow original exception. - return this.getKernelSpecList(interpreter, options); + output = await this.getKernelSpecList(interpreter, options); + return output; } else if (args.join(' ').toLowerCase() === '--version') { // Try getting kernelspec version using python script, if that fails (even if there's output in stderr) rethrow original exception. - return this.getKernelSpecVersion(interpreter, options); + output = await this.getKernelSpecVersion(interpreter, options); + return output; } } catch (innerEx) { traceError('Failed to get a list of the kernelspec using python script', innerEx); diff --git a/src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.ts b/src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.ts index d229ac181f7f..d89cd5416dc3 100644 --- a/src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.ts +++ b/src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.ts @@ -8,6 +8,7 @@ import { CancellationToken } from 'vscode'; import { IApplicationShell } from '../../../common/application/types'; import { Cancellation, createPromiseFromCancellation, wrapCancellationTokens } from '../../../common/cancellation'; import { ProductNames } from '../../../common/installer/productNames'; +import { traceError } from '../../../common/logger'; import { IInstaller, InstallerResponse, Product } from '../../../common/types'; import { Common, DataScience } from '../../../common/utils/localize'; import { noop } from '../../../common/utils/misc'; @@ -302,7 +303,8 @@ export class JupyterInterpreterDependencyService { return command .exec(['--version'], { throwOnStdErr: true }) .then(() => true) - .catch(() => { + .catch(e => { + traceError(`Kernel spec not found: `, e); sendTelemetryEvent(Telemetry.KernelSpecNotFound); return false; }); diff --git a/src/test/datascience/variableexplorer.functional.test.tsx b/src/test/datascience/variableexplorer.functional.test.tsx index bf0e2a8d8f54..f8b1e4e6cd5e 100644 --- a/src/test/datascience/variableexplorer.functional.test.tsx +++ b/src/test/datascience/variableexplorer.functional.test.tsx @@ -301,7 +301,7 @@ myDict = {'a': 1}`; { name: 'mySet', value: undefined, - supportsDataExplorer: true, + supportsDataExplorer: false, type: 'set', size: 54, shape: '',