@@ -63,12 +63,12 @@ function CreateRemoteAttachString(name: string, type: string, executable: string
6363` ;
6464 }
6565
66- function CreatePipeTransportString ( pipeProgram : string , debuggerProgram : string ) : string {
66+ function CreatePipeTransportString ( pipeProgram : string , debuggerProgram : string , pipeArgs : string [ ] = [ ] ) : string {
6767 return `
6868"pipeTransport": {
6969\t"debuggerPath": "/usr/bin/${ debuggerProgram } ",
7070\t"pipeProgram": "${ pipeProgram } ",
71- \t"pipeArgs": [] ,
71+ \t"pipeArgs": ${ JSON . stringify ( pipeArgs ) } ,
7272\t"pipeCwd": ""
7373}` ;
7474 }
@@ -226,7 +226,7 @@ export class WSLConfigurations extends Configuration {
226226 let body : string = formatString ( `
227227{
228228\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}
230230}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
231231
232232 return {
@@ -242,8 +242,8 @@ export class WSLConfigurations extends Configuration {
242242
243243 let body : string = formatString ( `
244244{
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}
247247}` , [ this . additionalProperties ? `,${ os . EOL } \t${ indentJsonString ( this . additionalProperties ) } ` : "" ] ) ;
248248
249249 return {
0 commit comments