What Is the .vscode Folder? settings.json, launch.json, tasks.json, and extensions.json Explained

The .vscode folder stores your project's workspace settings, debug configurations, tasks, and extension recommendations. Learn what each file does, when to commit it, and how to create them.

6 min read

The .vscode folder is a directory at the root of your project that stores workspace-level configuration files. VS Code reads these files to apply project-specific settings, debug configurations, build tasks, and extension recommendations.

It is the standard place for project-specific VS Code configuration in a single-folder workspace. When the files are committed, contributors can review and use the same settings, debug setup, tasks, and extension recommendations.

File overview at a glance

FilePurposeShould you commit?
settings.jsonWorkspace-specific settings (indentation, formatter, file exclusions)When the values are team-wide
launch.jsonDebug configurations (how to start and attach debuggers)When the setup is portable and shared
tasks.jsonBuild and automation tasks (compile, lint, test scripts)When the commands are reviewed and shared
extensions.jsonExtension recommendationsWhen the recommendations fit the project

settings.json

Workspace settings override your personal user settings for this project only. Use them when the project needs a specific behavior that should not depend on who opens it.

Common workspace settings include:

  • Indentation size and tabs versus spaces
  • Which formatter to use per language
  • Files and folders to exclude from the Explorer and search
  • Language-specific editor and formatter settings

To create the file, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Preferences: Open Workspace Settings (JSON). If the file does not exist, VS Code creates .vscode/settings.json for you.

Example:

jsonjson
{
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "files.exclude": {
    "**/node_modules": true,
    "**/dist": true
  }
}

This example uses built-in editor and file-exclusion settings, so it does not require an extension. Save the file and confirm that the workspace tab in the Settings editor shows the same values.

For a deeper comparison, see VS Code user settings vs workspace settings.

launch.json

This file defines how VS Code starts or attaches a debugger for your project. When you open the Run and Debug view and click create a launch.json file, VS Code prompts you to pick an environment and generates a template.

Each entry in the configurations array is one debug option in the dropdown. You can have multiple configurations for different scenarios: launch the app, attach to a running process, or run tests.

Example for a Node.js project:

jsonjson
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/src/index.js"
    }
  ]
}

For a complete walkthrough, see how to create and configure launch.json.

tasks.json

This file defines commands that VS Code can run for you: building, linting, testing, or any shell command. Tasks appear in the Terminal > Run Task menu and can be bound to keyboard shortcuts.

To create one, run Tasks: Configure Task from the Command Palette and choose a template. VS Code generates .vscode/tasks.json.

Example that exposes an existing npm run build script through Terminal > Run Task:

jsonjson
{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "npm",
      "script": "build",
      "label": "npm: build"
    }
  ]
}

Learn more in how to create and configure tasks.json.

extensions.json

This file recommends extensions to anyone who opens the project. VS Code can prompt on the first open, and teammates can review the list later with Extensions: Show Recommended Extensions.

To create one, run Extensions: Configure Recommended Extensions (Workspace Folder) from the Command Palette. VS Code creates .vscode/extensions.json and opens it for editing.

Example:

jsonjson
{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode"
  ]
}

Each entry uses the format publisher.extension. Find the identifier on the extension's details page, and verify its publisher, current availability, requirements, and security implications before recommending it. A recommendation never installs an extension automatically.

For more detail, see how to recommend VS Code extensions with extensions.json.

How to create the .vscode folder

VS Code creates the .vscode folder automatically the first time you save a workspace-level file.

Instead of creating files by hand, use these commands:

FileCommand to run
settings.jsonPreferences: Open Workspace Settings (JSON)
launch.jsonSelect create a launch.json file in Run and Debug
tasks.jsonTasks: Configure Task
extensions.jsonExtensions: Configure Recommended Extensions (Workspace Folder)

Each command creates the file inside .vscode/ if it does not already exist. You never need to create the folder manually.

What to commit and what to leave out

Commit files that define shared project behavior:

  • settings.json: Commit formatting rules, file exclusions, and language-specific linter settings that the team agrees on.
  • launch.json: Commit debug configurations that every developer needs.
  • tasks.json: Commit build and test tasks that are part of the standard workflow.
  • extensions.json: Commit extension recommendations so new contributors know which tools to install.

Do not commit:

  • Personal preferences like your color theme or font size: these belong in user settings
  • Absolute paths that only work on your machine: use ${workspaceFolder} variables instead
  • Secrets, tokens, or credentials: use environment variables or a separate untracked file

Workspace Trust and the .vscode folder

Because .vscode files can reference executable paths or commands, review them before trusting an unfamiliar project. In Restricted Mode, VS Code disables or limits AI agents, the terminal, tasks, debugging, workspace settings, and extensions that cannot run safely without trust.

This is a security feature. Review .vscode files before trusting a project you downloaded from the internet.

Rune AI

Rune AI

Key Insights

  • A project-root .vscode folder stores configuration for a single-folder workspace.
  • settings.json holds workspace settings that override user settings for the project.
  • launch.json defines reusable debug configurations.
  • tasks.json defines commands that VS Code can run.
  • extensions.json recommends extensions without installing them automatically.
  • Commit only portable, reviewed configuration with no secrets.
RunePowered by Rune AI

Frequently Asked Questions

Should I commit the .vscode folder to Git?

Commit only the files and values the whole team needs. Leave out personal preferences, machine-specific paths, secrets, and any command the team has not reviewed.

Does the .vscode folder work in a multi-root workspace?

Yes. Each root folder can have its own .vscode folder. Global workspace settings, tasks, launch configurations, and recommendations can also live in the .code-workspace file.

Can I have multiple launch configurations in one launch.json?

Yes. The configurations array can contain multiple entries, and each entry appears in the Run and Debug configuration list. Compound configurations can start several named configurations together.

Conclusion

The .vscode folder is how you share project configuration with your team. Keep settings.json for formatting rules, launch.json for debug setups, tasks.json for build automation, and extensions.json for tool recommendations. Commit the files your team needs and keep personal preferences in user settings instead.