Skip to content

Commit 961ff68

Browse files
authored
Remove 'ELECTRON_RUN_AS_NODE' env var on fork
1 parent 47d5f58 commit 961ff68

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/vs/workbench/parts/debug/node/debugAdapter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ export class DebugAdapter extends StreamDebugAdapter {
285285
if (this.adapterExecutable.command === 'node' && this.outputService) {
286286
if (Array.isArray(this.adapterExecutable.args) && this.adapterExecutable.args.length > 0) {
287287
const child = cp.fork(this.adapterExecutable.args[0], this.adapterExecutable.args.slice(1), {
288-
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
288+
execArgv: [ '-e', 'delete process.env.ELECTRON_RUN_AS_NODE;require(process.argv[1])' ].concat(process.execArgv || []),
289+
silent: true
289290
});
290291
if (!child.pid) {
291292
e(new Error(nls.localize('unableToLaunchDebugAdapter', "Unable to launch debug adapter from '{0}'.", this.adapterExecutable.args[0])));

0 commit comments

Comments
 (0)