Skip to content

More verbose conpty, winpty related error message#294193

Merged
anthonykim1 merged 1 commit intomainfrom
anthonykim1/updateTerminalProcessDesc
Feb 11, 2026
Merged

More verbose conpty, winpty related error message#294193
anthonykim1 merged 1 commit intomainfrom
anthonykim1/updateTerminalProcessDesc

Conversation

@anthonykim1
Copy link
Copy Markdown
Contributor

Resolves: #293524

@anthonykim1 anthonykim1 added this to the February 2026 milestone Feb 10, 2026
@anthonykim1 anthonykim1 requested a review from Tyriar February 10, 2026 18:30
@anthonykim1 anthonykim1 self-assigned this Feb 10, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 18:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the Windows terminal launch failure messaging by making the “Cannot launch conpty” native exception more actionable, pointing users to winpty removal context and a potential configuration workaround.

Changes:

  • Adds a specialized localized error message for conpty launch failures in TerminalProcess.
  • Adds a unit test covering formatting of the new conpty launch failure message in parseExitResult.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/platform/terminal/node/terminalProcess.ts Detects “Cannot launch conpty” errors and returns a more informative localized launch error message.
src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts Adds a regression test ensuring the conpty launch failure message is formatted as expected.

return { message: `A native exception occurred during launch (${err.message})` };
const errorMessage = err.message;
if (errorMessage?.includes('Cannot launch conpty')) {
return { message: localize('conptyLaunchFailed', "A native exception occurred during launch (Cannot launch conpty). Winpty has been removed, see {0} for more details. You can also try enabling the `{1}` setting.", 'https://code.visualstudio.com/updates/v1_109#_removal-of-winpty-support', 'terminal.integrated.windowsUseConptyDll') };
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This localized conpty error message ends with a period and includes markdown-style backticks around the setting name. Because parseExitResult appends a trailing "." when formatting launch failures, this will produce a double period in the final message. Also, backticks are typically used in markdown contexts; for plain error messages it would be more consistent to use quotes (or no decoration) around the setting name.

Suggested change
return { message: localize('conptyLaunchFailed', "A native exception occurred during launch (Cannot launch conpty). Winpty has been removed, see {0} for more details. You can also try enabling the `{1}` setting.", 'https://code.visualstudio.com/updates/v1_109#_removal-of-winpty-support', 'terminal.integrated.windowsUseConptyDll') };
return { message: localize('conptyLaunchFailed', "A native exception occurred during launch (Cannot launch conpty). Winpty has been removed, see {0} for more details. You can also try enabling the \"{1}\" setting", 'https://code.visualstudio.com/updates/v1_109#_removal-of-winpty-support', 'terminal.integrated.windowsUseConptyDll') };

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure if this is better tbh

@anthonykim1 anthonykim1 marked this pull request as ready for review February 11, 2026 17:49
@anthonykim1 anthonykim1 merged commit 04c6ff2 into main Feb 11, 2026
23 of 24 checks passed
@anthonykim1 anthonykim1 deleted the anthonykim1/updateTerminalProcessDesc branch February 11, 2026 18:27
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update error description to point to winpty removal, and/or conpty dll setting

3 participants