Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can't I launch or run tasks from terminal.integrated.profiles? #244879

Closed
TurkeyMan opened this issue Mar 27, 2025 · 2 comments
Closed

Why can't I launch or run tasks from terminal.integrated.profiles? #244879

TurkeyMan opened this issue Mar 27, 2025 · 2 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@TurkeyMan
Copy link

TurkeyMan commented Mar 27, 2025

In settings.json under terminal.integrated.profiles I describe some terminal environments, which in my case have some launch scripts that run when starting the terminal. There's also complex pathing and stuff.
I can select from these profiles when opening a "New Terminal" and interact with it as I expect; but when I describe tasks, for instance a shell task with options.shell, I can only specify executable and I have to give the path to the shell exe to launch the task in...

Why doesn't options.shell allow to select from shell profiles defined in terminal.integrated.profiles? I should only need to give a profile name, and it would launch the proper shell just how I defined it?

This also applies to launch.json.

@meganrogge meganrogge added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Mar 27, 2025
@meganrogge meganrogge closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2025
@TurkeyMan
Copy link
Author

Image

But why?
This seems really obvious and sensible... otherwise I have long paths and awkward shell launching commands repeated everywhere. If I tweak how a shell is launched, I need to updated that in 20 places or so. terminal.integrated.profiles described how to launch a shell with complex startup, and gives it a nice name, which could be used to as a reference to a pre-defined shell environment in tasks and launchers.

What have I misunderstood? Why is this a bad idea?

@meganrogge
Copy link
Contributor

The main reason we don’t currently support using terminal profile names in tasks.json or launch.json is because terminal profiles are tightly integrated with the interactive terminal experience, while tasks and launches are generally non-interactive or automated flows. Tasks and launches require more direct control over the exact shell executable and arguments to ensure consistency and portability across environments—especially in multi-platform or CI-related scenarios.

Additionally, terminal profiles can include user-specific setup (like scripts or environment tweaks) that might not behave consistently or predictably in the context of a task or launch, where determinism is often more important than customization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants