diff --git a/src/bootstrap-fork.js b/src/bootstrap-fork.js index 0f247ed809131..e3671222ccd04 100644 --- a/src/bootstrap-fork.js +++ b/src/bootstrap-fork.js @@ -239,13 +239,22 @@ function terminateWhenParentTerminates() { function configureCrashReporter() { const crashReporterSandboxedHint = process.env['VSCODE_CRASH_REPORTER_SANDBOXED_HINT']; if (crashReporterSandboxedHint) { - try { - if (process['crashReporter'] && typeof process['crashReporter'].addExtraParameter === 'function' /* Electron only */) { - process['crashReporter'].addExtraParameter('_sandboxed', 'true'); - } - } catch (error) { - console.error(error); + addCrashReporterParameter('_sandboxed', 'true'); + } + + const crashReporterProcessType = process.env['VSCODE_CRASH_REPORTER_PROCESS_TYPE']; + if (crashReporterProcessType) { + addCrashReporterParameter('processType', crashReporterProcessType); + } +} + +function addCrashReporterParameter(key, value) { + try { + if (process['crashReporter'] && typeof process['crashReporter'].addExtraParameter === 'function' /* Electron only */) { + process['crashReporter'].addExtraParameter(key, value); } + } catch (error) { + console.error(error); } } diff --git a/src/vs/platform/utilityProcess/electron-main/utilityProcess.ts b/src/vs/platform/utilityProcess/electron-main/utilityProcess.ts index 0d907ece06325..22759147b521d 100644 --- a/src/vs/platform/utilityProcess/electron-main/utilityProcess.ts +++ b/src/vs/platform/utilityProcess/electron-main/utilityProcess.ts @@ -237,8 +237,9 @@ export class UtilityProcess extends Disposable { env['VSCODE_PARENT_PID'] = String(configuration.parentLifecycleBound); } if (isWindowSandboxed) { - env['VSCODE_CRASH_REPORTER_SANDBOXED_HINT'] = '1'; + env['VSCODE_CRASH_REPORTER_SANDBOXED_HINT'] = '1'; // TODO@bpasero remove me once sandbox is final } + env['VSCODE_CRASH_REPORTER_PROCESS_TYPE'] = configuration.type; // Remove any environment variables that are not allowed removeDangerousEnvVariables(env);