Skip to content

Commit 867244c

Browse files
authored
always re-direct output (microsoft#912)
Fixes microsoft#710
1 parent cc5f954 commit 867244c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/client/debugger/DebugClients/LocalDebugClient.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,12 @@ export class LocalDebugClient extends DebugClient<LaunchRequestArguments> {
157157
}
158158
// tslint:disable-next-line:member-ordering
159159
protected buildLauncherArguments(): string[] {
160-
let vsDebugOptions = ['RedirectOutput'];
160+
const vsDebugOptions = ['RedirectOutput'];
161161
if (Array.isArray(this.args.debugOptions)) {
162-
vsDebugOptions = this.args.debugOptions.filter(opt => VALID_DEBUG_OPTIONS.indexOf(opt) >= 0);
162+
this.args.debugOptions.filter(opt => VALID_DEBUG_OPTIONS.indexOf(opt) >= 0)
163+
.forEach(item => vsDebugOptions.push(item));
163164
}
164165

165-
// Include a dummy value, to ensure something gets sent.
166-
// Else, argument positions get messed up due to an empty string.
167-
vsDebugOptions = vsDebugOptions.length === 0 ? ['DUMMYVALUE'] : vsDebugOptions;
168-
169166
const programArgs = Array.isArray(this.args.args) && this.args.args.length > 0 ? this.args.args : [];
170167
if (typeof this.args.module === 'string' && this.args.module.length > 0) {
171168
return [vsDebugOptions.join(','), '-m', this.args.module].concat(programArgs);

0 commit comments

Comments
 (0)