Support nested .vscode folders #108204
Labels
config
VS Code configuration, set up issues
*duplicate
Issue identified as a duplicate of another issue(s)
feature-request
Request for new features or functionality
Milestone
The problem
I'd like for VS Code to be able to recognize that a folder in my working tree is its own "root workspace" without having to actually make it a top-level folder in a multi-root workspace. I'd suggest doing so by checking for the presence of a
.vscode
folders in the working tree, and if found, exposing the respective nested launch tasks up at the workspace level on the debug pane:Background
Background: it's common for Git repos to contain several projects either of varying types/languages, or multiple of the same language:
ex1, multi-language:
ex2, multiple C# projects:
It makes logical sense to open the top-level
myproject
folder in VS Code as the workspace; I get access to all the docs, readme, and other files that aren't necessarily within one of the individual project folders likeconsole-app
. But if I do so, none of the launch settings or debug tasks are discovered correctly. VS Code will try to createmyproject/.vscode
and might auto-detect one of the projects, but I still have to go add the rest manually.Alternatives
Multi-root worksapces
You might say but that's what mutli-root workspaces are for! But that's the problem - I don't want multiple root workspaces, which flattens the directory structure. A multi-root workspace would look like:
I lose access to easily edit other files in the directory tree (and the presentation of projects themselves lose their position in the tree)... Unless I add back the whole repo as one of the multiple roots on top of each project, but that seems like a silly workaround, doesn't really solve the positioning issue and I'd then have multiple files in the workspace tree pointing to the same file on disk.
Manually configure launch.json
A user could open each project folder in VS Code as an independent workspace, have it generate the appropriate
.vscode/*
launch and task configurations, then merge them all intomyproject/.vscode
when opening the repo folder as the top-level workspace. This is long, tedious, and error prone and also requires path replacements.In short
I'd be wonderful if VS code would treat any nested folders with a
.vscode
folder present as one of the root workspaces, similar to the multi-root workspaces model. This wouldn't impose restrictions on which folders are opened as top-level/root workspaces, and still permit launching different types of nested projects.The text was updated successfully, but these errors were encountered: