Change:
logLevelsValue.push(LogLevelToString(logLevels.default)); } for (const [extension, logLevel] of logLevels.extensions ?? []) { <del> logLevelsValue.push(`${extension}:${LogLevelToString(logLevel)}`); </del> <ins> logLevelsValue.push(`${extension}=${LogLevelToString(logLevel)}`); </ins> } await this.jsonEditingService.write(this.environmentService.argvResource, [{ path: ['log-level'], value: logLevelsValue.length ? logLevelsValue : undefined }], true); } private async _parseLogLevelsFromArgv(): Promise<ParsedArgvLogLevels | undefined> { const result: ParsedArgvLogLevels = { extensions: [] }; <ins> const logLevels = await this._readLogLevelsFromArgv(); for (const extensionLogLevel of logLevels) { const matches = EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(extensionLogLevel); if (matches && matches[1] && matches[2]) { const logLevel = parseLogLevel(matches[2]); if (!isUndefined(logLevel)) { result.extensions?.push([matches[1].toLowerCase(), logLevel]); } } else { const logLevel = parseLogLevel(extensionLogLevel); if (!isUndefined(logLevel)) { result.default = logLevel; } } } return !isUndefined(result.default) || result.extensions?.length ? result : undefined; } async migrateLogLevels(): Promise<void> { const logLevels = await this._readLogLevelsFromArgv(); const regex = /^([^.]+..+):(.+)$/; if (logLevels.some(extensionLogLevel => regex.test(extensionLogLevel))) { const argvLogLevel = await this._parseLogLevelsFromArgv(); if (argvLogLevel) { await this._writeLogLevelsToArgv(argvLogLevel); } } } private async _readLogLevelsFromArgv(): Promise<string[]> { </ins> try { const content = await this.fileService.readFile(this.environmentService.argvResource); const argv: { 'log-level'?: string | string[] } = parse(content.value.toString()); <del> const logLevels = isString(argv['log-level']) ? [argv['log-level']] : Array.isArray(argv['log-level']) ? argv['log-level'] : []; for (const extensionLogLevel of logLevels) { const matches = EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(extensionLogLevel); if (matches && matches[1] && matches[2]) { const logLevel = parseLogLevel(matches[2]); if (!isUndefined(logLevel)) { result.extensions?.push([matches[1].toLowerCase(), logLevel]); } } else { const logLevel = parseLogLevel(extensionLogLevel); if (!isUndefined(logLevel)) { result.default = logLevel; } } } </del> <ins> return isString(argv['log-level']) ? [argv['log-level']] : Array.isArray(argv['log-level']) ? argv['log-level'] : []; </ins> } catch (error) { if (toFileOperationResult(error) !== FileOperationResult.FILE_NOT_FOUND) { this.logService.error(error); } } <del> return !isUndefined(result.default) || result.extensions?.length ? result : undefined; </del> <ins> return []; </ins> } private _getDefaultLogLevelFromEnv(): LogLevel {

Discussion:
Repro: title bar style from custom -native restart, it shuts down but doesn't start again Version: 1.81.0-insider (user setup) Commit: Date: 2023-07-25T08:12:53.439Z Electron: 22.3.17 ElectronBuildId: Chromium: 108.0.5359.215 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.
I had screen reader mode on if that matters
Following API is used to restart
does this reproduce consistently? I think I have seen this once today when I was also testing to change the title style but now I cannot reproduce anymore. I wonder if a pending update could be part of the reason it fails to restart because I think I had a pending update. //cc for the update part, I wonder if this has come up before
it was yesterday, I just tried again and it also did not start up.
Anything in the logs when you run with ? Does it reproduce running out of sources?
All times I reproduced in Insiders. Logs here, see it terminated instead of relaunching:
No, it seems to do the right thing: This would indicate that Electrons API fails here. any clue? curious if there is possibly a native crash here, can you run with the arg and see if there is a crash dump?
Weird one for you... It works fine when I set a crash reporter dir, but not without it. Running this worked when I restarted 3 times: Running this did not work when I restarted 3 times:
I was not seeing crash dumps before, I do see one which I'll DM to you
Just tried with only one window (vscode repo) open and no pty host and it still happens.
More tests: All builds down to vscode-bisect 1.77 were bad It works fine in stable 1.80.1 It does not work in insiders 1.80.0 It does not work in user install or archive for insiders
I am still not able to reproduce even on my native Windows Surface machine. I am inclined to close this as out of scope given its not something stable users see. curious, how is exploration builds for you?

or can you forward me the crash dump, I am also unable to repro with insiders. Couple more follow-up questions, 1) Is the stable build a user install or system install ? 2) Does it work fine with portable mode for archive insiders ? 3) Does it work with user install insiders when you add to ?
I think it was a red herring as there was only 1 crash dump despite 3 restarts. I'll send regardless Exploration worked , hopefully that means insiders will when Electron is updated
Reopening since issue is present with insiders for
Analysis of the bug is for reference. The root issue is that vscode has URI like arguments when setting log level for extensions which has the format and if additional arguments follow this uri like argument then the runtime will abort early on start due to an RCE fix made a long time back The fix here would be to switch from using uri separator to something like or . Similar kind of arguments can be found in the runtime as well ;l=103-123, which use as separator.