---
tags:
- devops
- l1
- flashcard-deck
- vscode
---
<!-- wiki:breadcrumb:start -->
[Portal](../../../../library/portal/index.md) | **Level:** [L1: Foundations](../../../../library/portal/levels.md) | **Topics:** [VS Code](../../../../library/portal/topics.md) | **Domain:** DevOps & Tooling
<!-- wiki:breadcrumb:end -->

id	category	difficulty	tags	question	answer	source_path
vscode/a1b2c3d4e5c6	vscode	easy	vscode, extensions, terraform	What VS Code extension provides Terraform syntax highlighting, autocomplete, and format-on-save?	"The HashiCorp Terraform extension. It also provides go-to-definition for module references.\n\nRemember: ""VS Code = Visual Studio Code."" Built on Electron. Extensions make it powerful for any language.\n\nFun fact: VS Code is the most popular IDE/editor, used by ~70% of developers (Stack Overflow survey).\n\nGotcha: The HashiCorp Terraform extension requires terraform CLI to be installed and in PATH for validation features to work.\n\nExample: Enable format-on-save: `""editor.formatOnSave"": true` with `""[terraform]"": {""editor.defaultFormatter"": ""hashicorp.terraform""}`."	training/library/topics/vscode/primer.md
vscode/b2c3d4e5c6d7	vscode	easy	vscode, terminal	How do you split the integrated terminal in VS Code, and why is this useful for DevOps work?	Use Ctrl+Shift+5 to split terminals. This lets you run a watch command (e.g., kubectl logs -f) in one pane while editing in another, keeping monitoring and development side by side.\n\nExample: Ctrl+Shift+` opens a new terminal. Use terminal profiles to color-code by environment (green=dev, red=prod).	training/library/topics/vscode/primer.md
vscode/c3d4e5c6d7e8	vscode	easy	vscode, settings	What VS Code setting trims trailing whitespace automatically, and in which file is it configured?	"files.trimTrailingWhitespace: true, configured in settings.json (user settings). This helps maintain clean files across all DevOps file types.""\n\nRemember: ""VS Code Remote = develop anywhere."" Remote-SSH edits files on a server, Dev Containers runs in Docker, Codespaces runs in the cloud.\n\nGotcha: Extensions install on the remote side — your local machine just runs the UI.\n\nGotcha: Trimming whitespace can cause unwanted diffs in files with intentional trailing spaces (like Markdown line breaks with two spaces)."	training/library/topics/vscode/primer.md
vscode/d4e5c6d7e8f9	vscode	medium	vscode, remote, ssh	What does the Remote-SSH extension allow you to do, and how does it work?	"Remote-SSH lets you connect to remote servers and edit files as if they were local. You connect via Ctrl+Shift+P, ""Remote-SSH: Connect to Host,"" and enter user@hostname. VS Code then opens folders, runs terminal commands, and enables debugging — all on the remote machine using your ~/.ssh/config.\n\nUnder the hood: VS Code installs a server component (~/.vscode-server) on the remote host. Extensions run server-side for performance."	training/library/topics/vscode/primer.md
vscode/e5c6d7e8f9a0	vscode	medium	vscode, devcontainers	What problem do Dev Containers solve, and where is the configuration defined?	"Dev Containers guarantee every contributor has identical tools, versions, and extensions by defining the development environment as code. Configuration lives in .devcontainer/devcontainer.json and can specify a base image, features (Docker, kubectl, Terraform), extensions, and post-create commands.\n\nAnalogy: Dev Containers are like ""infrastructure as code"" for your development environment — every contributor gets the exact same tools."	training/library/topics/vscode/primer.md
vscode/c6d7e8f9a0b1	vscode	medium	vscode, tasks	How do you automate common commands like linting and testing in VS Code?	"By defining tasks in .vscode/tasks.json. Each task specifies a label, type (shell), command, and group. Run tasks via Ctrl+Shift+P, ""Tasks: Run Task."" You can set a default test task so it runs with a keyboard shortcut.\n\nExample: `{""label"": ""test"", ""type"": ""shell"", ""command"": ""make test"", ""group"": {""kind"": ""test"", ""isDefault"": true}}` — Ctrl+Shift+T runs it."	training/library/topics/vscode/primer.md
vscode/d7e8f9a0b1c2	vscode	medium	vscode, yaml, schema	How does VS Code validate Kubernetes manifests and GitHub Actions workflows against their schemas?	"The Red Hat YAML extension validates files against JSON schemas. Configure it in settings.json with ""yaml.schemas"" mapping schema URLs to file globs — e.g., ""kubernetes"" for k8s/**/*.yaml and the GitHub workflow JSON schema for .github/workflows/*.yml."	training/library/topics/vscode/primer.md
vscode/e8f9a0b1c2d3	vscode	hard	vscode, workspaces, multi-root	What is a multi-root workspace, and when would a DevOps engineer use one?	A multi-root workspace lets you open multiple separate directories (app, infrastructure, k8s-config repos) in a single VS Code window, defined in a .code-workspace file. DevOps engineers use it when working across application code, Terraform modules, and Kubernetes manifests simultaneously, avoiding constant window switching.\n\nExample: Create with File > Save Workspace As. The .code-workspace file is JSON listing folder paths and shared settings.	training/library/topics/vscode/primer.md
vscode/f9a0b1c2d3e4	vscode	hard	vscode, debugging, fastapi	How do you configure VS Code to debug a FastAPI application with breakpoints?	"Create a .vscode/launch.json configuration with type ""debugpy"", request ""launch"", module ""uvicorn"", and args pointing to the app module (e.g., ""app.api.main:app"", ""--reload"", ""--port"", ""8000""). Set breakpoints by clicking the gutter, then press F5 to start debugging with full variable inspection.\n\nGotcha: If breakpoints are grayed out, ensure `""justMyCode"": false` is set in launch.json to debug into library code."	training/library/topics/vscode/primer.md
vscode/a0b1c2d3e4f5	vscode	hard	vscode, terminal, profiles	How do you create environment-specific terminal profiles in VS Code, and why is this useful?	"Define profiles in settings.json under ""terminal.integrated.profiles.linux"" with a path, args that set environment variables (e.g., KUBECONFIG for staging vs production), and visual cues like custom icons and colors (red for production). This prevents accidentally running commands against the wrong cluster.\n\nWar story: An engineer ran kubectl delete against production because their terminal was pointed at the wrong cluster. Color-coded profiles prevent this."	training/library/topics/vscode/primer.md

<!-- wiki:related:start -->
---

## Wiki Navigation

### Related Content

- [VS Code for DevOps](../../../../library/topics/vscode/index.md) (Topic Pack, L0) — VS Code

<!-- wiki:related:end -->
