Skip to content

Commit 30c0860

Browse files
authored
fix: preserve process.execArgv (microsoft#161853)
This ensures flags like `--prof` are passed down to the vs code process so we can profile everything. To test this: 1. run `./lib/node --prof .` 2. in another terminal, run `ps -ejww` You should see `--prof` next to every vs code process.
1 parent 6e9e82b commit 30c0860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/server/node/extensionHostConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export class ExtensionHostConnection {
228228

229229
public async start(startParams: IRemoteExtensionHostStartParams): Promise<void> {
230230
try {
231-
let execArgv: string[] = [];
231+
let execArgv: string[] = process.execArgv ? process.execArgv.filter(a => !/^--inspect(-brk)?=/.test(a)) : [];
232232
if (startParams.port && !(<any>process).pkg) {
233233
execArgv = [`--inspect${startParams.break ? '-brk' : ''}=${startParams.port}`];
234234
}

0 commit comments

Comments
 (0)