import { DebugConfiguration , WorkspaceFolder } from 'vscode' ; import { hostStartTaskName } from '../constants' ; import { localize } from '../localize' ; import { FuncDebugProviderBase } from './FuncDebugProviderBase' ; export const defaultCustomPipeName = 'AzureFunctionsPSWorker' ; export const powershellDebugConfig = { name : localize ( 'attachPowerShell' , 'Attach to PowerShell Functions' ) , type : 'PowerShell' , request : 'attach' , customPipeName : defaultCustomPipeName , runspaceId : 1 , preLaunchTask : hostStartTaskName } ; export class PowerShellDebugProvider extends FuncDebugProviderBase { public readonly workerArgKey : string = 'PSWorkerCustomPipeName' ; protected defaultPortOrPipeName : string | number = defaultCustomPipeName ; protected readonly debugConfig : DebugConfiguration = powershellDebugConfig ; public async getWorkerArgValue ( folder ) { const port = this . getDebugPortOrPipeName ( folder ) ; return String ( port ) ; } }