import { DebugConfiguration , WorkspaceFolder } from 'vscode' ; import { hostStartTaskName } from '../constants' ; import { localize } from '../localize' ; import { FuncDebugProviderBase } from './FuncDebugProviderBase' ; export const defaultNodeDebugPort = 9229 ; export const nodeDebugConfig = { name : localize ( 'attachNode' , 'Attach to Node Functions' ) , type : 'node' , request : 'attach' , port : defaultNodeDebugPort , preLaunchTask : hostStartTaskName } ; export class NodeDebugProvider extends FuncDebugProviderBase { public readonly workerArgKey : string = 'languageWorkers__node__arguments' ; protected readonly defaultPortOrPipeName : number = defaultNodeDebugPort ; protected readonly debugConfig : DebugConfiguration = nodeDebugConfig ; public async getWorkerArgValue ( folder ) { const port = this . getDebugPortOrPipeName ( folder ) ; return `--inspect=${ port }` ; } }