提交 64eb716d 编写于 作者: B Benjamin Pasero

env - fully qualify our own variables

上级 c03bc427
......@@ -23,7 +23,7 @@ if (process.env['VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH']) {
}
// Configure: pipe logging to parent process
if (!!process.send && process.env.PIPE_LOGGING === 'true') {
if (!!process.send && process.env['VSCODE_PIPE_LOGGING'] === 'true') {
pipeLoggingToParent();
}
......@@ -41,7 +41,7 @@ if (process.env['VSCODE_PARENT_PID']) {
configureCrashReporter();
// Load AMD entry point
require('./bootstrap-amd').load(process.env['AMD_ENTRYPOINT']);
require('./bootstrap-amd').load(process.env['VSCODE_AMD_ENTRYPOINT']);
//#region Helpers
......@@ -82,7 +82,7 @@ function pipeLoggingToParent() {
// Add the stack trace as payload if we are told so. We remove the message and the 2 top frames
// to start the stacktrace where the console message was being written
if (process.env.VSCODE_LOG_STACK === 'true') {
if (process.env['VSCODE_LOG_STACK'] === 'true') {
const stack = new Error().stack;
if (stack) {
argsArray.push({ __$stack: stack.split('\n').slice(3).join('\n') });
......@@ -152,7 +152,7 @@ function pipeLoggingToParent() {
* @param {'log' | 'warn' | 'error'} severity
*/
function wrapConsoleMethod(method, severity) {
if (process.env.VSCODE_LOG_NATIVE === 'true') {
if (process.env['VSCODE_LOG_NATIVE'] === 'true') {
const original = console[method];
console[method] = function () {
safeSendConsoleMessage(severity, safeToArray(arguments));
......@@ -168,12 +168,12 @@ function pipeLoggingToParent() {
}
// Pass console logging to the outside so that we have it in the main side if told so
if (process.env.VERBOSE_LOGGING === 'true') {
if (process.env['VSCODE_VERBOSE_LOGGING'] === 'true') {
wrapConsoleMethod('info', 'log');
wrapConsoleMethod('log', 'log');
wrapConsoleMethod('warn', 'warn');
wrapConsoleMethod('error', 'error');
} else if (process.env.VSCODE_LOG_NATIVE !== 'true') {
} else if (process.env['VSCODE_LOG_NATIVE'] !== 'true') {
console.log = function () { /* ignore */ };
console.warn = function () { /* ignore */ };
console.info = function () { /* ignore */ };
......@@ -209,7 +209,7 @@ function terminateWhenParentTerminates() {
}
function configureCrashReporter() {
const crashReporterOptionsRaw = process.env['CRASH_REPORTER_START_OPTIONS'];
const crashReporterOptionsRaw = process.env['VSCODE_CRASH_REPORTER_START_OPTIONS'];
if (typeof crashReporterOptionsRaw === 'string') {
try {
const crashReporterOptions = JSON.parse(crashReporterOptionsRaw);
......
......@@ -43,7 +43,7 @@ const CHAR_QUESTION_MARK = 63; /* ? */
class ErrorInvalidArgType extends Error {
code: 'ERR_INVALID_ARG_TYPE';
constructor(name: string, expected: string, actual: any) {
constructor(name: string, expected: string, actual: unknown) {
// determiner: 'must be' or 'must not be'
let determiner;
if (typeof expected === 'string' && expected.indexOf('not ') === 0) {
......@@ -215,7 +215,7 @@ export const win32: IPath = {
// absolute path, get cwd for that drive, or the process cwd if
// the drive cwd is not available. We're sure the device is not
// a UNC path at this points, because UNC paths are always absolute.
path = (process.env as any)[`=${resolvedDevice}`] || process.cwd();
path = process.env[`=${resolvedDevice}`] || process.cwd();
// Verify that a cwd was found and that it actually points
// to our drive. If not, default to the drive's root.
......
......@@ -8,6 +8,7 @@ const LANGUAGE_DEFAULT = 'en';
let _isWindows = false;
let _isMacintosh = false;
let _isLinux = false;
let _isLinuxSnap = false;
let _isNative = false;
let _isWeb = false;
let _isIOS = false;
......@@ -79,6 +80,7 @@ else if (typeof nodeProcess === 'object') {
_isWindows = (nodeProcess.platform === 'win32');
_isMacintosh = (nodeProcess.platform === 'darwin');
_isLinux = (nodeProcess.platform === 'linux');
_isLinuxSnap = _isLinux && !!nodeProcess.env['SNAP'] && !!nodeProcess.env['SNAP_REVISION'];
_locale = LANGUAGE_DEFAULT;
_language = LANGUAGE_DEFAULT;
const rawNlsConfig = nodeProcess.env['VSCODE_NLS_CONFIG'];
......@@ -128,6 +130,7 @@ if (_isMacintosh) {
export const isWindows = _isWindows;
export const isMacintosh = _isMacintosh;
export const isLinux = _isLinux;
export const isLinuxSnap = _isLinuxSnap;
export const isNative = _isNative;
export const isWeb = _isWeb;
export const isIOS = _isIOS;
......
......@@ -50,7 +50,7 @@ function terminateProcess(process: cp.ChildProcess, cwd?: string): Promise<Termi
options.cwd = cwd;
}
const killProcess = cp.execFile('taskkill', ['/T', '/F', '/PID', process.pid.toString()], options);
return new Promise((resolve, reject) => {
return new Promise(resolve => {
killProcess.once('error', (err) => {
resolve({ success: false, error: err });
});
......@@ -68,7 +68,7 @@ function terminateProcess(process: cp.ChildProcess, cwd?: string): Promise<Termi
} else if (Platform.isLinux || Platform.isMacintosh) {
try {
const cmd = FileAccess.asFileUri('vs/base/node/terminateProcess.sh', require).fsPath;
return new Promise((resolve, reject) => {
return new Promise(resolve => {
cp.execFile(cmd, [process.pid.toString()], { encoding: 'utf8', shell: true } as cp.ExecFileOptions, (err, stdout, stderr) => {
if (err) {
resolve({ success: false, error: err });
......@@ -86,8 +86,8 @@ function terminateProcess(process: cp.ChildProcess, cwd?: string): Promise<Termi
return Promise.resolve({ success: true });
}
export function getWindowsShell(environment: Platform.IProcessEnvironment = process.env as Platform.IProcessEnvironment): string {
return environment['comspec'] || 'cmd.exe';
export function getWindowsShell(env = process.env as Platform.IProcessEnvironment): string {
return env['comspec'] || 'cmd.exe';
}
export abstract class AbstractProcess<TProgressData> {
......@@ -447,8 +447,8 @@ export namespace win32 {
// to the current working directory.
return path.join(cwd, command);
}
if (paths === undefined && Types.isString(process.env.PATH)) {
paths = process.env.PATH.split(path.delimiter);
if (paths === undefined && Types.isString(process.env['PATH'])) {
paths = process.env['PATH'].split(path.delimiter);
}
// No PATH environment. Make path absolute to the cwd.
if (paths === undefined || paths.length === 0) {
......
......@@ -12,29 +12,29 @@ import * as processes from 'vs/base/node/processes';
* shell that the terminal uses by default.
* @param p The platform to detect the shell of.
*/
export function getSystemShell(p: platform.Platform, environment: platform.IProcessEnvironment = process.env as platform.IProcessEnvironment): string {
export function getSystemShell(p: platform.Platform, env = process.env as platform.IProcessEnvironment): string {
if (p === platform.Platform.Windows) {
if (platform.isWindows) {
return getSystemShellWindows(environment);
return getSystemShellWindows(env);
}
// Don't detect Windows shell when not on Windows
return processes.getWindowsShell(environment);
return processes.getWindowsShell(env);
}
// Only use $SHELL for the current OS
if (platform.isLinux && p === platform.Platform.Mac || platform.isMacintosh && p === platform.Platform.Linux) {
return '/bin/bash';
}
return getSystemShellUnixLike(environment);
return getSystemShellUnixLike(env);
}
let _TERMINAL_DEFAULT_SHELL_UNIX_LIKE: string | null = null;
function getSystemShellUnixLike(environment: platform.IProcessEnvironment): string {
function getSystemShellUnixLike(env: platform.IProcessEnvironment): string {
if (!_TERMINAL_DEFAULT_SHELL_UNIX_LIKE) {
let unixLikeTerminal: string;
if (platform.isWindows) {
unixLikeTerminal = '/bin/bash'; // for WSL
} else {
unixLikeTerminal = environment.SHELL;
unixLikeTerminal = env['SHELL'];
if (!unixLikeTerminal) {
try {
......@@ -59,12 +59,12 @@ function getSystemShellUnixLike(environment: platform.IProcessEnvironment): stri
}
let _TERMINAL_DEFAULT_SHELL_WINDOWS: string | null = null;
function getSystemShellWindows(environment: platform.IProcessEnvironment): string {
function getSystemShellWindows(env: platform.IProcessEnvironment): string {
if (!_TERMINAL_DEFAULT_SHELL_WINDOWS) {
const isAtLeastWindows10 = platform.isWindows && parseFloat(os.release()) >= 10;
const is32ProcessOn64Windows = environment.hasOwnProperty('PROCESSOR_ARCHITEW6432');
const powerShellPath = `${environment.windir}\\${is32ProcessOn64Windows ? 'Sysnative' : 'System32'}\\WindowsPowerShell\\v1.0\\powershell.exe`;
_TERMINAL_DEFAULT_SHELL_WINDOWS = isAtLeastWindows10 ? powerShellPath : processes.getWindowsShell(environment);
const is32ProcessOn64Windows = env.hasOwnProperty('PROCESSOR_ARCHITEW6432');
const powerShellPath = `${env['windir']}\\${is32ProcessOn64Windows ? 'Sysnative' : 'System32'}\\WindowsPowerShell\\v1.0\\powershell.exe`;
_TERMINAL_DEFAULT_SHELL_WINDOWS = isAtLeastWindows10 ? powerShellPath : processes.getWindowsShell(env);
}
return _TERMINAL_DEFAULT_SHELL_WINDOWS;
}
......@@ -11,7 +11,7 @@ import { getPathFromAmdModule } from 'vs/base/common/amd';
function createClient(): Client {
return new Client(getPathFromAmdModule(require, 'bootstrap-fork'), {
serverName: 'TestServer',
env: { AMD_ENTRYPOINT: 'vs/base/parts/ipc/test/node/testApp', verbose: true }
env: { VSCODE_AMD_ENTRYPOINT: 'vs/base/parts/ipc/test/node/testApp', verbose: true }
});
}
......
......@@ -13,9 +13,9 @@ import { getPathFromAmdModule } from 'vs/base/common/amd';
function fork(id: string): cp.ChildProcess {
const opts: any = {
env: objects.mixin(objects.deepClone(process.env), {
AMD_ENTRYPOINT: id,
PIPE_LOGGING: 'true',
VERBOSE_LOGGING: true
VSCODE_AMD_ENTRYPOINT: id,
VSCODE_PIPE_LOGGING: 'true',
VSCODE_VERBOSE_LOGGING: true
})
};
......
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { app, ipcMain, systemPreferences, contentTracing, protocol, BrowserWindow, dialog, session } from 'electron';
import { IProcessEnvironment, isWindows, isMacintosh, isLinux } from 'vs/base/common/platform';
import { IProcessEnvironment, isWindows, isMacintosh, isLinux, isLinuxSnap } from 'vs/base/common/platform';
import { WindowsMainService } from 'vs/platform/windows/electron-main/windowsMainService';
import { IWindowOpenable } from 'vs/platform/windows/common/windows';
import { ILifecycleMainService, LifecycleMainPhase } from 'vs/platform/lifecycle/electron-main/lifecycleMainService';
......@@ -294,7 +294,7 @@ export class CodeApplication extends Disposable {
// - an error after 10s and stop trying to resolve
const cts = new CancellationTokenSource();
const shellEnvSlowWarningHandle = setTimeout(() => window?.sendWhenReady('vscode:showShellEnvSlowWarning', cts.token), 3000);
const shellEnvTimeoutErrorHandle = setTimeout(function () {
const shellEnvTimeoutErrorHandle = setTimeout(() => {
cts.dispose(true);
window?.sendWhenReady('vscode:showShellEnvTimeoutError', CancellationToken.None);
acceptShellEnv({});
......@@ -491,8 +491,8 @@ export class CodeApplication extends Disposable {
break;
case 'linux':
if (process.env.SNAP && process.env.SNAP_REVISION) {
services.set(IUpdateService, new SyncDescriptor(SnapUpdateService, [process.env.SNAP, process.env.SNAP_REVISION]));
if (isLinuxSnap) {
services.set(IUpdateService, new SyncDescriptor(SnapUpdateService, [process.env['SNAP'], process.env['SNAP_REVISION']]));
} else {
services.set(IUpdateService, new SyncDescriptor(LinuxUpdateService));
}
......
......@@ -643,32 +643,32 @@ export class CodeWindow extends Disposable implements ICodeWindow {
}
private onConfigurationUpdated(): void {
// Menubar
const newMenuBarVisibility = this.getMenuBarVisibility();
if (newMenuBarVisibility !== this.currentMenuBarVisibility) {
this.currentMenuBarVisibility = newMenuBarVisibility;
this.setMenuBarVisibility(newMenuBarVisibility);
}
// Do not set to empty configuration at startup if setting is empty to not override configuration through CLI options:
const env = process.env;
// Proxy
let newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim()
|| (env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || '').trim() // Not standardized.
|| (process.env['https_proxy'] || process.env['HTTPS_PROXY'] || process.env['http_proxy'] || process.env['HTTP_PROXY'] || '').trim() // Not standardized.
|| undefined;
if (newHttpProxy?.endsWith('/')) {
newHttpProxy = newHttpProxy.substr(0, newHttpProxy.length - 1);
}
const newNoProxy = (env.no_proxy || env.NO_PROXY || '').trim() || undefined; // Not standardized.
const newNoProxy = (process.env['no_proxy'] || process.env['NO_PROXY'] || '').trim() || undefined; // Not standardized.
if ((newHttpProxy || '').indexOf('@') === -1 && (newHttpProxy !== this.currentHttpProxy || newNoProxy !== this.currentNoProxy)) {
this.currentHttpProxy = newHttpProxy;
this.currentNoProxy = newNoProxy;
const proxyRules = newHttpProxy || '';
const proxyBypassRules = newNoProxy ? `${newNoProxy},<local>` : '<local>';
this.logService.trace(`Setting proxy to '${proxyRules}', bypassing '${proxyBypassRules}'`);
this._win.webContents.session.setProxy({
proxyRules,
proxyBypassRules,
pacScript: '',
});
this._win.webContents.session.setProxy({ proxyRules, proxyBypassRules, pacScript: '' });
}
}
......
......@@ -7,7 +7,7 @@ import 'vs/css!./media/issueReporter';
import 'vs/base/browser/ui/codicons/codiconStyles'; // make sure codicon css is loaded
import { INativeHostService } from 'vs/platform/native/electron-sandbox/native';
import { NativeHostService } from 'vs/platform/native/electron-sandbox/nativeHostService';
import { ipcRenderer, process } from 'vs/base/parts/sandbox/electron-sandbox/globals';
import { ipcRenderer } from 'vs/base/parts/sandbox/electron-sandbox/globals';
import { applyZoom, zoomIn, zoomOut } from 'vs/platform/windows/electron-sandbox/window';
import { $, reset, safeInnerHtml, windowOpenNoOpener } from 'vs/base/browser/dom';
import { Button } from 'vs/base/browser/ui/button/button';
......@@ -83,14 +83,12 @@ export class IssueReporter extends Disposable {
this.initServices(configuration);
const isSnap = process.platform === 'linux' && process.env.SNAP && process.env.SNAP_REVISION;
const targetExtension = configuration.data.extensionId ? configuration.data.enabledExtensions.find(extension => extension.id === configuration.data.extensionId) : undefined;
this.issueReporterModel = new IssueReporterModel({
issueType: configuration.data.issueType || IssueType.Bug,
versionInfo: {
vscodeVersion: `${configuration.product.nameShort} ${configuration.product.version} (${configuration.product.commit || 'Commit unknown'}, ${configuration.product.date || 'Date unknown'})`,
os: `${this.configuration.os.type} ${this.configuration.os.arch} ${this.configuration.os.release}${isSnap ? ' snap' : ''}`
os: `${this.configuration.os.type} ${this.configuration.os.arch} ${this.configuration.os.release}${platform.isLinuxSnap ? ' snap' : ''}`
},
extensionsDisabled: !!configuration.disableExtensions,
fileOnExtension: configuration.data.extensionId ? !targetExtension?.isBuiltin : undefined,
......
......@@ -314,10 +314,10 @@ export class DiagnosticsService implements IDiagnosticsService {
if (isLinux) {
systemInfo.linuxEnv = {
desktopSession: process.env.DESKTOP_SESSION,
xdgSessionDesktop: process.env.XDG_SESSION_DESKTOP,
xdgCurrentDesktop: process.env.XDG_CURRENT_DESKTOP,
xdgSessionType: process.env.XDG_SESSION_TYPE
desktopSession: process.env['DESKTOP_SESSION'],
xdgSessionDesktop: process.env['XDG_SESSION_DESKTOP'],
xdgCurrentDesktop: process.env['XDG_CURRENT_DESKTOP'],
xdgSessionType: process.env['XDG_SESSION_TYPE']
};
}
......
......@@ -39,9 +39,9 @@ export class FileWatcher extends Disposable {
serverName: 'File Watcher (nsfw)',
args: ['--type=watcherService'],
env: {
AMD_ENTRYPOINT: 'vs/platform/files/node/watcher/nsfw/watcherApp',
PIPE_LOGGING: 'true',
VERBOSE_LOGGING: 'true' // transmit console logs from server to client
VSCODE_AMD_ENTRYPOINT: 'vs/platform/files/node/watcher/nsfw/watcherApp',
VSCODE_PIPE_LOGGING: 'true',
VSCODE_VERBOSE_LOGGING: 'true' // transmit console logs from server to client
}
}
));
......
......@@ -40,9 +40,9 @@ export class FileWatcher extends Disposable {
serverName: 'File Watcher (chokidar)',
args: ['--type=watcherService'],
env: {
AMD_ENTRYPOINT: 'vs/platform/files/node/watcher/unix/watcherApp',
PIPE_LOGGING: 'true',
VERBOSE_LOGGING: 'true' // transmit console logs from server to client
VSCODE_AMD_ENTRYPOINT: 'vs/platform/files/node/watcher/unix/watcherApp',
VSCODE_PIPE_LOGGING: 'true',
VSCODE_VERBOSE_LOGGING: 'true' // transmit console logs from server to client
}
}
));
......
......@@ -9,7 +9,7 @@ import { MessageBoxOptions, MessageBoxReturnValue, shell, OpenDevToolsOptions, S
import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService';
import { IOpenedWindow, IOpenWindowOptions, IWindowOpenable, IOpenEmptyWindowOptions, IColorScheme } from 'vs/platform/windows/common/windows';
import { INativeOpenDialogOptions } from 'vs/platform/dialogs/common/dialogs';
import { isMacintosh, isWindows, isLinux } from 'vs/base/common/platform';
import { isMacintosh, isWindows, isLinux, isLinuxSnap } from 'vs/base/common/platform';
import { ICommonNativeHostService, IOSProperties, IOSStatistics } from 'vs/platform/native/common/native';
import { ISerializableCommandAction } from 'vs/platform/actions/common/actions';
import { IEnvironmentMainService } from 'vs/platform/environment/electron-main/environmentMainService';
......@@ -333,8 +333,8 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
}
async openExternal(windowId: number | undefined, url: string): Promise<boolean> {
if (isLinux && process.env.SNAP && process.env.SNAP_REVISION) {
NativeHostMainService._safeSnapOpenExternal(url);
if (isLinuxSnap) {
this.safeSnapOpenExternal(url);
} else {
shell.openExternal(url);
}
......@@ -342,7 +342,9 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
return true;
}
private static _safeSnapOpenExternal(url: string): void {
private safeSnapOpenExternal(url: string): void {
// Remove some environment variables before opening to avoid issues...
const gdkPixbufModuleFile = process.env['GDK_PIXBUF_MODULE_FILE'];
const gdkPixbufModuleDir = process.env['GDK_PIXBUF_MODULEDIR'];
delete process.env['GDK_PIXBUF_MODULE_FILE'];
......@@ -350,6 +352,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
shell.openExternal(url);
// ...but restore them after
process.env['GDK_PIXBUF_MODULE_FILE'] = gdkPixbufModuleFile;
process.env['GDK_PIXBUF_MODULEDIR'] = gdkPixbufModuleDir;
}
......
......@@ -64,7 +64,7 @@ export async function resolveCommonProperties(
}
});
if (process.platform === 'linux' && process.env.SNAP && process.env.SNAP_REVISION) {
if (Platform.isLinuxSnap) {
// __GDPR__COMMON__ "common.snap" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result['common.snap'] = 'true';
}
......
......@@ -124,6 +124,7 @@ class BrowserMain extends Disposable {
env: {
async retrievePerformanceMarks() {
await timerService.whenReady();
return timerService.getPerformanceMarks();
}
},
......
......@@ -31,8 +31,8 @@ export class NodeDebugHelperService implements IDebugHelperService {
args: args,
env: {
ELECTRON_RUN_AS_NODE: 1,
PIPE_LOGGING: 'true',
AMD_ENTRYPOINT: 'vs/workbench/contrib/debug/node/telemetryApp'
VSCODE_PIPE_LOGGING: 'true',
VSCODE_AMD_ENTRYPOINT: 'vs/workbench/contrib/debug/node/telemetryApp'
}
}
);
......
......@@ -6,7 +6,7 @@
import * as nls from 'vs/nls';
import { fromNow } from 'vs/base/common/date';
import { mnemonicButtonLabel } from 'vs/base/common/labels';
import { isLinux, isWindows } from 'vs/base/common/platform';
import { isLinux, isLinuxSnap, isWindows } from 'vs/base/common/platform';
import Severity from 'vs/base/common/severity';
import { MessageBoxOptions } from 'vs/base/parts/sandbox/common/electronTypes';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
......@@ -161,7 +161,6 @@ export class NativeDialogHandler implements IDialogHandler {
version = `${version} (${this.productService.target} setup)`;
}
const isSnap = process.platform === 'linux' && process.env.SNAP && process.env.SNAP_REVISION;
const osProps = await this.nativeHostService.getOSProperties();
const detailString = (useAgo: boolean): string => {
......@@ -174,7 +173,7 @@ export class NativeDialogHandler implements IDialogHandler {
process.versions['chrome'],
process.versions['node'],
process.versions['v8'],
`${osProps.type} ${osProps.arch} ${osProps.release}${isSnap ? ' snap' : ''}`
`${osProps.type} ${osProps.arch} ${osProps.release}${isLinuxSnap ? ' snap' : ''}`
);
};
......
......@@ -160,9 +160,9 @@ export class LocalProcessExtensionHost implements IExtensionHost {
this._tryFindDebugPort()
]).then(([pipeName, portNumber]) => {
const env = objects.mixin(objects.deepClone(process.env), {
AMD_ENTRYPOINT: 'vs/workbench/services/extensions/node/extensionHostProcess',
PIPE_LOGGING: 'true',
VERBOSE_LOGGING: true,
VSCODE_AMD_ENTRYPOINT: 'vs/workbench/services/extensions/node/extensionHostProcess',
VSCODE_PIPE_LOGGING: 'true',
VSCODE_VERBOSE_LOGGING: true,
VSCODE_LOG_NATIVE: this._isExtensionDevHost,
VSCODE_IPC_HOOK_EXTHOST: pipeName,
VSCODE_HANDLES_UNCAUGHT_ERRORS: true,
......@@ -227,7 +227,7 @@ export class LocalProcessExtensionHost implements IExtensionHost {
// For https://github.com/microsoft/vscode/issues/105743
const extHostCrashDirectory = this._environmentService.crashReporterDirectory || this._environmentService.userDataPath;
opts.env.BREAKPAD_DUMP_LOCATION = join(extHostCrashDirectory, `${ExtensionHostLogFileName} Crash Reports`);
opts.env.CRASH_REPORTER_START_OPTIONS = JSON.stringify(crashReporterStartOptions);
opts.env.VSCODE_CRASH_REPORTER_START_OPTIONS = JSON.stringify(crashReporterStartOptions);
}
// Run Extension Host as fork of current process
......
......@@ -67,9 +67,9 @@ export class DiskSearch implements ISearchResultProvider {
// results in the forked process inheriting `--inspect-brk=xxx`.
freshExecArgv: true,
env: {
AMD_ENTRYPOINT: 'vs/workbench/services/search/node/searchApp',
PIPE_LOGGING: 'true',
VERBOSE_LOGGING: verboseLogging
VSCODE_AMD_ENTRYPOINT: 'vs/workbench/services/search/node/searchApp',
VSCODE_PIPE_LOGGING: 'true',
VSCODE_VERBOSE_LOGGING: verboseLogging
},
useQueue: true
};
......
......@@ -55,6 +55,7 @@ export interface IMemoryInfo {
"timers.ellapsedEditorRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWorkbench" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedNlsGeneration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"timers.ellapsedWaitForShellEnv" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"platform" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"release" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"arch" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
......
......@@ -456,12 +456,11 @@ interface IPerformanceMark {
interface IWorkbench {
commands: {
/**
* Allows to execute a command, either built-in or from extensions.
*/
executeCommand(command: string, ...args: any[]): Promise<unknown>;
},
}
env: {
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册