From 1699ec02cdf829ef07ff7fdcd9302cd6ed6eb94b Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 21 Mar 2018 19:18:53 -0700 Subject: [PATCH] Adding -c flag to WSL configurations (#1722) Missing the -c flag for bash.exe --- Extension/src/Debugger/configurations.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Extension/src/Debugger/configurations.ts b/Extension/src/Debugger/configurations.ts index b2649d27de..aca5382647 100644 --- a/Extension/src/Debugger/configurations.ts +++ b/Extension/src/Debugger/configurations.ts @@ -63,12 +63,12 @@ function CreateRemoteAttachString(name: string, type: string, executable: string `; } - function CreatePipeTransportString(pipeProgram: string, debuggerProgram: string): string { + function CreatePipeTransportString(pipeProgram: string, debuggerProgram: string, pipeArgs: string[] = []): string { return ` "pipeTransport": { \t"debuggerPath": "/usr/bin/${debuggerProgram}", \t"pipeProgram": "${pipeProgram}", -\t"pipeArgs": [], +\t"pipeArgs": ${JSON.stringify(pipeArgs)}, \t"pipeCwd": "" }`; } @@ -226,7 +226,7 @@ export class WSLConfigurations extends Configuration { let body: string = formatString(` { \t${indentJsonString(CreateLaunchString(name, this.miDebugger, this.executable))}, -\t${indentJsonString(CreatePipeTransportString(this.bashPipeProgram, this.MIMode))}{0} +\t${indentJsonString(CreatePipeTransportString(this.bashPipeProgram, this.MIMode, ["-c"]))}{0} }`, [this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalProperties)}` : ""]); return { @@ -242,8 +242,8 @@ export class WSLConfigurations extends Configuration { let body: string = formatString(` { -\t${indentJsonString(CreateAttachString(name, this.miDebugger, this.executable))}, -\t${indentJsonString(CreatePipeTransportString(this.bashPipeProgram, this.MIMode))}{0} +\t${indentJsonString(CreateRemoteAttachString(name, this.miDebugger, this.executable))}, +\t${indentJsonString(CreatePipeTransportString(this.bashPipeProgram, this.MIMode, ["-c"]))}{0} }`, [this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalProperties)}` : ""]); return {