提交 93aac9fa 编写于 作者: A Andre Weinand

better isElectron check

上级 9bf7c8dd
......@@ -325,7 +325,7 @@ export class DebugAdapter extends StreamDebugAdapter {
if (this.adapterExecutable.command === 'node') {
if (Array.isArray(this.adapterExecutable.args) && this.adapterExecutable.args.length > 0) {
const isElectron = typeof (process.versions.electron) === 'string';
const isElectron = process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron'];
const child = cp.fork(this.adapterExecutable.args[0], this.adapterExecutable.args.slice(1), {
execArgv: isElectron ? ['-e', 'delete process.env.ELECTRON_RUN_AS_NODE;require(process.argv[1])'] : [],
silent: true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册