Skip to content

[macOS] Custom terminal not found on first launch #230160

@mharringADI

Description

@mharringADI

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.93.1
  • OS Version: macOS Sonoma 14.5

We're using a custom terminal (provided by our extension) set as the default terminal in a .code-workspace. When launching VS Code, the wrong terminal is being used for the first terminal instance created. Every subsequent terminal is created using our custom terminal as expected. This can lead to issues when using our extension because we are providing environment variables to the terminal that are missing when the wrong terminal is used.

I've tried adjusting the extension activation settings and confirmed that the extension is indeed activating.

I am able to reproduce the same issue using the terminal-sample in the VS Code extension samples repo, so it doesn't appear to be specific to our extension.

I can only reproduce this issue on macOS - I could not reproduce on Windows 10.

Steps to Reproduce:

  1. Clone the terminal-sample (https://github.com/microsoft/vscode-extension-samples/tree/main/terminal-sample).
  2. Build and debug the sample.
  3. Close the Terminal view, if open.
  4. Create a workspace (File > Save Workspace As...) and save it anywhere.
  5. In the workspace settings, set the custom terminal as the default:
"settings": {
    "terminal.integrated.defaultProfile.osx": "Terminal API Profile",
}
  1. Reload the debugged VS Code Window using the Command Palette (Developer: Reload Window)
  2. Open the workspace settings and note the warning under the "Terminal API Profile":
Screenshot 2024-09-30 at 3 20 42 PM 8. Create a new terminal. This should use the "Terminal API Profile" by default, but it opens `zsh` instead. 9. Create another new terminal. The "Terminal API Profile" is correctly used.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugterminal-profiles

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions