@@ -63,12 +63,12 @@ function CreateRemoteAttachString(name: string, type: string, executable: string
63
63
` ;
64
64
}
65
65
66
- function CreatePipeTransportString ( pipeProgram : string , debuggerProgram : 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 } ",
70
70
\t"pipeProgram": "${ pipeProgram } ",
71
- \t"pipeArgs": [] ,
71
+ \t"pipeArgs": ${ JSON . stringify ( pipeArgs ) } ,
72
72
\t"pipeCwd": ""
73
73
}` ;
74
74
}
@@ -226,7 +226,7 @@ export class WSLConfigurations extends Configuration {
226
226
let body : string = formatString ( `
227
227
{
228
228
\t${ indentJsonString ( CreateLaunchString ( name , this . miDebugger , this . executable ) ) } ,
229
- \t${ indentJsonString ( CreatePipeTransportString ( this . bashPipeProgram , this . MIMode ) ) } {0}
229
+ \t${ indentJsonString ( CreatePipeTransportString ( this . bashPipeProgram , this . MIMode , [ "-c" ] ) ) } {0}
230
230
}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
231
231
232
232
return {
@@ -242,8 +242,8 @@ export class WSLConfigurations extends Configuration {
242
242
243
243
let body : string = formatString ( `
244
244
{
245
- \t${ indentJsonString ( CreateAttachString ( name , this . miDebugger , this . executable ) ) } ,
246
- \t${ indentJsonString ( CreatePipeTransportString ( this . bashPipeProgram , this . MIMode ) ) } {0}
245
+ \t${ indentJsonString ( CreateRemoteAttachString ( name , this . miDebugger , this . executable ) ) } ,
246
+ \t${ indentJsonString ( CreatePipeTransportString ( this . bashPipeProgram , this . MIMode , [ "-c" ] ) ) } {0}
247
247
}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
248
248
249
249
return {
0 commit comments