diff --git a/src/client/datascience/api/jupyterIntegration.ts b/src/client/datascience/api/jupyterIntegration.ts index 4df5a8a7cd11..36bb40d93ff0 100644 --- a/src/client/datascience/api/jupyterIntegration.ts +++ b/src/client/datascience/api/jupyterIntegration.ts @@ -6,9 +6,11 @@ // Licensed under the MIT License. import { inject, injectable } from 'inversify'; +import { dirname } from 'path'; import { CancellationToken, Event, Uri } from 'vscode'; import { InterpreterUri } from '../../common/installer/types'; import { IExtensions, IInstaller, InstallerResponse, Product, Resource } from '../../common/types'; +import { getDebugpyPackagePath } from '../../debugger/extension/adapter/remoteLaunchers'; import { IEnvironmentActivationService } from '../../interpreter/activation/types'; import { IInterpreterQuickPickItem, IInterpreterSelector } from '../../interpreter/configuration/types'; import { IInterpreterService } from '../../interpreter/contracts'; @@ -51,6 +53,10 @@ type PythonApiForJupyterExtension = { * IInstaller */ install(product: Product, resource?: InterpreterUri, cancel?: CancellationToken): Promise; + /** + * Returns path to where `debugpy` is. In python extension this is `/pythonFiles/lib/python`. + */ + getDebuggerPath(): Promise; }; type JupyterExtensionApi = { @@ -97,7 +103,8 @@ export class JupyterExtensionIntegration { product: Product, resource?: InterpreterUri, cancel?: CancellationToken - ): Promise => this.installer.install(product, resource, cancel) + ): Promise => this.installer.install(product, resource, cancel), + getDebuggerPath: async () => dirname(getDebugpyPackagePath()) }); } }