Every language has its own compiler or runtime, but the workflow inside VS Code barely changes. Learn this loop once — write, run, debug, build — and switching languages becomes mostly a matter of installing the right extension.

1. Write

Open your project folder (File → Open Folder) and create a source file with the right extension: .py, .js, .ts, .cpp, .rs, .go, .java, and so on. Once the matching language extension is installed, you get IntelliSense (autocomplete), inline error squiggles and go-to-definition as you type.

A tip that applies everywhere: hover over any symbol to see its type and documentation, and press F2 to rename it safely across the whole project.

2. Run

There are three ways to run code, in increasing order of control:

  • The Run button: many extensions add a ▶ button at the top-right of the editor that runs the current file.
  • The integrated terminal (Ctrl+`): run the language's command yourself. This is the most transparent option:
python3 app.py      # Python
node app.js         # JavaScript
cargo run           # Rust
go run .            # Go
dotnet run          # C#
  • Run and Debug (F5): runs your program attached to the debugger.

Using the terminal is worth getting comfortable with — it's exactly what runs on a server or in automation, so it never hides anything from you.

3. Debug

Debugging is VS Code's superpower, and it works the same across languages:

  • Click in the gutter to the left of a line number to set a breakpoint (a red dot).
  • Press F5 to start debugging. Execution pauses at the breakpoint.
  • Inspect variables in the Variables panel, hover over them in the editor, or add expressions to Watch.
  • Step through with F10 (step over), F11 (step into) and Shift+F11 (step out).
  • Read the Call Stack to see how you got to the current line.

The first time you debug a language, VS Code creates a launch.json file describing how to start your program. You can usually accept the defaults the extension suggests. Stepping through a failing program beats scattering print statements — you see the real state at every line.

4. Build

"Build" means turning your source into something you can run or ship. What that involves depends on the language:

  • Interpreted (Python, JavaScript): no compile step — you run the source directly. "Building" is really packaging dependencies (a virtual environment, or npm install and a bundler like Vite).
  • Compiled (C, C++, Rust, Go): a compiler turns source into a binary, e.g. g++ main.cpp -o app, cargo build --release, go build.
  • VM languages (Java, C#, Kotlin): compiled to bytecode and packaged as a JAR or DLL, e.g. mvn package, dotnet build.

VS Code can run any build command for you as a task. Press Ctrl+Shift+P → "Tasks: Configure Default Build Task", pick your compiler, and from then on Ctrl+Shift+B builds your project. Tasks are stored in tasks.json so the whole team builds the same way.

The same loop, every language

Install the extension, write code with IntelliSense, run it from the terminal or the Run button, set breakpoints and debug with F5, and build with a task or the language's CLI. Once this loop is muscle memory, picking up a new language is mostly learning its syntax — the tools around it stay familiar. Each language's specific install and commands are covered in our per-language setup guides.