diff --git a/configureWorkspace/configDebugProvider.ts b/configureWorkspace/configDebugProvider.ts index 77e2a84249..b7624d3d97 100644 --- a/configureWorkspace/configDebugProvider.ts +++ b/configureWorkspace/configDebugProvider.ts @@ -6,23 +6,17 @@ 'use strict'; import * as vscode from 'vscode'; -export class DockerDebugConfigProvider implements vscode.DebugConfigurationProvider { +import { ext } from '../extensionVariables'; - public provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): vscode.ProviderResult { +export class DockerDebugConfigProvider implements vscode.DebugConfigurationProvider { - const config: vscode.DebugConfiguration = { + public async provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): Promise { + const remoteRoot = await ext.ui.showInputBox({ value: '/usr/src/app', prompt: 'Please enter your Docker remote root' }); + return [{ name: 'Docker: Attach to Node', type: 'node', request: 'attach', - port: 9229, - address: 'localhost', - localRoot: '\${workspaceFolder}', - remoteRoot: '/usr/src/app', - protocol: 'inspector' - }; - - return [config]; - + remoteRoot + }]; } - } diff --git a/package.json b/package.json index 6db69af78a..c4f14ba8a2 100644 --- a/package.json +++ b/package.json @@ -287,11 +287,7 @@ "type": "node", "request": "attach", "name": "Docker: Attach to Node", - "port": 9229, - "address": "localhost", - "localRoot": "^\"\\${workspaceFolder}\"", - "remoteRoot": "/usr/src/app", - "protocol": "inspector" + "remoteRoot": "/usr/src/app" } } ]