@@ -47,24 +47,29 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
4747 folder : WorkspaceFolder | undefined ,
4848 token ?: CancellationToken ) : Promise < DebugConfiguration [ ] > {
4949
50- const launchCurrentFileLabel = "Launch Current File" ;
51- const launchScriptLabel = "Launch Script" ;
52- const interactiveSessionLabel = "Interactive Session" ;
50+ const launchCurrentFileId = 0 ;
51+ const launchScriptId = 1 ;
52+ const interactiveSessionId = 2 ;
53+ const attachHostProcessId = 3 ;
5354
5455 const debugConfigPickItems = [
5556 {
56- label : launchCurrentFileLabel ,
57+ id : launchCurrentFileId ,
58+ label : "Launch Current File" ,
5759 description : "Launch and debug the file in the currently active editor window" ,
5860 } ,
5961 {
60- label : launchScriptLabel ,
62+ id : launchScriptId ,
63+ label : "Launch Script" ,
6164 description : "Launch and debug the specified file or command" ,
6265 } ,
6366 {
64- label : interactiveSessionLabel ,
67+ id : interactiveSessionId ,
68+ label : "Interactive Session" ,
6569 description : "Debug commands executed from the Integrated Console" ,
6670 } ,
6771 {
72+ id : attachHostProcessId ,
6873 label : "Attach" ,
6974 description : "Attach the debugger to a running PowerShell Host Process" ,
7075 } ,
@@ -75,7 +80,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
7580 debugConfigPickItems ,
7681 { placeHolder : "Select a PowerShell debug configuration" } ) ;
7782
78- if ( launchSelection . label === launchCurrentFileLabel ) {
83+ if ( launchSelection . id === launchCurrentFileId ) {
7984 return [
8085 {
8186 name : "PowerShell: Launch Current File" ,
@@ -85,7 +90,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
8590 cwd : "${file}" ,
8691 } ,
8792 ] ;
88- } else if ( launchSelection . label === launchScriptLabel ) {
93+ } else if ( launchSelection . id === launchScriptId ) {
8994 return [
9095 {
9196 name : "PowerShell: Launch Script" ,
@@ -95,7 +100,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
95100 cwd : "${workspaceFolder}" ,
96101 } ,
97102 ] ;
98- } else if ( launchSelection . label === interactiveSessionLabel ) {
103+ } else if ( launchSelection . id === interactiveSessionId ) {
99104 return [
100105 {
101106 name : "PowerShell: Interactive Session" ,
0 commit comments