@@ -47,24 +47,29 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
47
47
folder : WorkspaceFolder | undefined ,
48
48
token ?: CancellationToken ) : Promise < DebugConfiguration [ ] > {
49
49
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 ;
53
54
54
55
const debugConfigPickItems = [
55
56
{
56
- label : launchCurrentFileLabel ,
57
+ id : launchCurrentFileId ,
58
+ label : "Launch Current File" ,
57
59
description : "Launch and debug the file in the currently active editor window" ,
58
60
} ,
59
61
{
60
- label : launchScriptLabel ,
62
+ id : launchScriptId ,
63
+ label : "Launch Script" ,
61
64
description : "Launch and debug the specified file or command" ,
62
65
} ,
63
66
{
64
- label : interactiveSessionLabel ,
67
+ id : interactiveSessionId ,
68
+ label : "Interactive Session" ,
65
69
description : "Debug commands executed from the Integrated Console" ,
66
70
} ,
67
71
{
72
+ id : attachHostProcessId ,
68
73
label : "Attach" ,
69
74
description : "Attach the debugger to a running PowerShell Host Process" ,
70
75
} ,
@@ -75,7 +80,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
75
80
debugConfigPickItems ,
76
81
{ placeHolder : "Select a PowerShell debug configuration" } ) ;
77
82
78
- if ( launchSelection . label === launchCurrentFileLabel ) {
83
+ if ( launchSelection . id === launchCurrentFileId ) {
79
84
return [
80
85
{
81
86
name : "PowerShell: Launch Current File" ,
@@ -85,7 +90,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
85
90
cwd : "${file}" ,
86
91
} ,
87
92
] ;
88
- } else if ( launchSelection . label === launchScriptLabel ) {
93
+ } else if ( launchSelection . id === launchScriptId ) {
89
94
return [
90
95
{
91
96
name : "PowerShell: Launch Script" ,
@@ -95,7 +100,7 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
95
100
cwd : "${workspaceFolder}" ,
96
101
} ,
97
102
] ;
98
- } else if ( launchSelection . label === interactiveSessionLabel ) {
103
+ } else if ( launchSelection . id === interactiveSessionId ) {
99
104
return [
100
105
{
101
106
name : "PowerShell: Interactive Session" ,
0 commit comments