extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts/getExecArgv
function getExecArgv(kind: TsServerProcessKind, configuration: TypeScriptServiceConfiguration): string[] {
	const args: string[] = [];

	const debugPort = getDebugPort(kind);
	if (debugPort) {
		const inspectFlag = getTssDebugBrk() ? '--inspect-brk' : '--inspect';
		args.push(`${inspectFlag}=${debugPort}`);
	}

	if (configuration.maxTsServerMemory) {
		args.push(`--max-old-space-size=${configuration.maxTsServerMemory}`);
	}

	return args;
}