@@ -31,7 +31,7 @@ function formatString(format: string, args: string[]): string {
31
31
return format ;
32
32
}
33
33
34
- function CreateLaunchString ( name : string , type : string , executable : string ) : string {
34
+ function createLaunchString ( name : string , type : string , executable : string ) : string {
35
35
return `"name": "${ name } ",
36
36
"type": "${ type } ",
37
37
"request": "launch",
@@ -44,7 +44,7 @@ function CreateLaunchString(name: string, type: string, executable: string): str
44
44
` ;
45
45
}
46
46
47
- function CreateAttachString ( name : string , type : string , executable : string ) : string {
47
+ function createAttachString ( name : string , type : string , executable : string ) : string {
48
48
return formatString ( `
49
49
"name": "${ name } ",
50
50
"type": "${ type } ",
@@ -53,7 +53,7 @@ function CreateAttachString(name: string, type: string, executable: string): str
53
53
` , [ type === "cppdbg" ? `${ os . EOL } "program": "${ "enter program name, for example $\{workspaceFolder\}/" + executable } ",` : "" ] ) ;
54
54
}
55
55
56
- function CreateRemoteAttachString ( name : string , type : string , executable : string ) : string {
56
+ function createRemoteAttachString ( name : string , type : string , executable : string ) : string {
57
57
return `
58
58
"name": "${ name } ",
59
59
"type": "${ type } ",
@@ -63,7 +63,7 @@ function CreateRemoteAttachString(name: string, type: string, executable: string
63
63
` ;
64
64
}
65
65
66
- function CreatePipeTransportString ( pipeProgram : string , debuggerProgram : string , pipeArgs : string [ ] = [ ] ) : string {
66
+ function createPipeTransportString ( pipeProgram : string , debuggerProgram : string , pipeArgs : string [ ] = [ ] ) : string {
67
67
return `
68
68
"pipeTransport": {
69
69
\t"debuggerPath": "/usr/bin/${ debuggerProgram } ",
@@ -106,7 +106,7 @@ export class MIConfigurations extends Configuration {
106
106
let name : string = `(${ this . MIMode } ) Launch` ;
107
107
108
108
let body : string = formatString ( `{
109
- \t${ indentJsonString ( CreateLaunchString ( name , this . miDebugger , this . executable ) ) } ,
109
+ \t${ indentJsonString ( createLaunchString ( name , this . miDebugger , this . executable ) ) } ,
110
110
\t"MIMode": "${ this . MIMode } "{0}{1}
111
111
}` , [ this . miDebugger === "cppdbg" && os . platform ( ) === "win32" ? `,${ os . EOL } \t"miDebuggerPath": "/path/to/gdb"` : "" ,
112
112
this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
@@ -124,7 +124,7 @@ this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalPrope
124
124
let name : string = `(${ this . MIMode } ) Attach` ;
125
125
126
126
let body : string = formatString ( `{
127
- \t${ indentJsonString ( CreateAttachString ( name , this . miDebugger , this . executable ) ) } ,
127
+ \t${ indentJsonString ( createAttachString ( name , this . miDebugger , this . executable ) ) } ,
128
128
\t"MIMode": "${ this . MIMode } "{0}{1}
129
129
}` , [ this . miDebugger === "cppdbg" && os . platform ( ) === "win32" ? `,${ os . EOL } \t"miDebuggerPath": "/path/to/gdb"` : "" ,
130
130
this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
@@ -146,8 +146,8 @@ export class PipeTransportConfigurations extends Configuration {
146
146
147
147
let body : string = formatString ( `
148
148
{
149
- \t${ indentJsonString ( CreateLaunchString ( name , this . miDebugger , this . executable ) ) } ,
150
- \t${ indentJsonString ( CreatePipeTransportString ( this . pipeProgram , this . MIMode ) ) } ,
149
+ \t${ indentJsonString ( createLaunchString ( name , this . miDebugger , this . executable ) ) } ,
150
+ \t${ indentJsonString ( createPipeTransportString ( this . pipeProgram , this . MIMode ) ) } ,
151
151
\t"MIMode": "${ this . MIMode } "{0}
152
152
}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
153
153
@@ -165,8 +165,8 @@ export class PipeTransportConfigurations extends Configuration {
165
165
166
166
let body : string = formatString ( `
167
167
{
168
- \t${ indentJsonString ( CreateRemoteAttachString ( name , this . miDebugger , this . executable ) ) } ,
169
- \t${ indentJsonString ( CreatePipeTransportString ( this . pipeProgram , this . MIMode ) ) } ,
168
+ \t${ indentJsonString ( createRemoteAttachString ( name , this . miDebugger , this . executable ) ) } ,
169
+ \t${ indentJsonString ( createPipeTransportString ( this . pipeProgram , this . MIMode ) ) } ,
170
170
\t"MIMode": "${ this . MIMode } "{0}
171
171
}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
172
172
return {
@@ -186,7 +186,7 @@ export class WindowsConfigurations extends Configuration {
186
186
187
187
let body : string = `
188
188
{
189
- \t${ indentJsonString ( CreateLaunchString ( name , this . windowsDebugger , this . executable ) ) }
189
+ \t${ indentJsonString ( createLaunchString ( name , this . windowsDebugger , this . executable ) ) }
190
190
}` ;
191
191
192
192
return {
@@ -204,7 +204,7 @@ export class WindowsConfigurations extends Configuration {
204
204
205
205
let body : string = `
206
206
{
207
- \t${ indentJsonString ( CreateAttachString ( name , this . windowsDebugger , this . executable ) ) }
207
+ \t${ indentJsonString ( createAttachString ( name , this . windowsDebugger , this . executable ) ) }
208
208
}` ;
209
209
210
210
return {
@@ -226,8 +226,8 @@ export class WSLConfigurations extends Configuration {
226
226
227
227
let body : string = formatString ( `
228
228
{
229
- \t${ indentJsonString ( CreateLaunchString ( name , this . miDebugger , this . executable ) ) } ,
230
- \t${ indentJsonString ( CreatePipeTransportString ( this . bashPipeProgram , this . MIMode , [ "-c" ] ) ) } {0}
229
+ \t${ indentJsonString ( createLaunchString ( name , this . miDebugger , this . executable ) ) } ,
230
+ \t${ indentJsonString ( createPipeTransportString ( this . bashPipeProgram , this . MIMode , [ "-c" ] ) ) } {0}
231
231
}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
232
232
233
233
return {
@@ -243,8 +243,8 @@ export class WSLConfigurations extends Configuration {
243
243
244
244
let body : string = formatString ( `
245
245
{
246
- \t${ indentJsonString ( CreateRemoteAttachString ( name , this . miDebugger , this . executable ) ) } ,
247
- \t${ indentJsonString ( CreatePipeTransportString ( this . bashPipeProgram , this . MIMode , [ "-c" ] ) ) } {0}
246
+ \t${ indentJsonString ( createRemoteAttachString ( name , this . miDebugger , this . executable ) ) } ,
247
+ \t${ indentJsonString ( createPipeTransportString ( this . bashPipeProgram , this . MIMode , [ "-c" ] ) ) } {0}
248
248
}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
249
249
250
250
return {
0 commit comments