VS CODE
Boost your coding productivity using Visual Studio Code
extensions, debugging tools, and customization features.
Visual Studio Code (VS Code) – Step-by-Step Guide
VS Code is a free, lightweight, and powerful source code editor developed by Microsoft. It supports multiple programming languages, extensions, Git integration, debugging, and more.
Download from https://code.visualstudio.com
- Choose your OS: Windows, macOS, or Linux
- Run the installer and follow the setup steps
To open a folder or project:
- Click on File → Open Folder
- Select the directory containing your project
- Use the integrated file explorer on the left
Right-click inside the Explorer and select New File. Name the file and begin typing your code.
VS Code supports various themes for a better coding experience.
-
Go to View → Command Palette (or press
Ctrl+Shift+P) - Type
Color Themeand choose your preferred theme
Extensions add support for languages, themes, debuggers, linters, and frameworks.
- Click the Extensions icon on the sidebar
- Search and install: Python, JavaScript, Prettier, Live Server, etc.
Access a terminal directly inside VS Code.
View → Terminal (or Ctrl + `)
# Use it like a normal command-line interface
Open files side-by-side using the split editor.
- Right-click a tab → Split Right or drag it to the side
- Useful for comparing files or working on multiple files at once
Automatically saves your file when changes are made.
- Go to File → Auto Save
- You can also configure auto save delay in settings
VS Code provides intelligent code completion and suggestions.
-
Type a few characters and press
Ctrl+Spaceto see suggestions - Works with languages like JavaScript, Python, C++, etc.
VS Code Features and Configuration
VS Code has built-in support for Git version control.
- Click the Source Control icon in the sidebar
- It auto-detects Git repos and shows changes
- Use buttons to stage, commit, and push changes
Debug your code directly in the editor.
-
Click the Run and Debug icon or press
F5 - Choose your environment (Node.js, Python, etc.)
- Set breakpoints, step through code, and inspect variables
Configure VS Code behavior using settings.
-
Go to File → Preferences → Settings or press
Ctrl+, - You can search and update settings like font size, auto save, tab size, etc.
For fine-grained control, use settings.json.
-
Open Command Palette →
Preferences: Open Settings (JSON) - Edit values directly in JSON format
{
"editor.fontSize": 16,
"editor.tabSize": 2
}
Workspace-specific settings override user settings for a particular project.
- Open a folder → Click Manage → Workspace Settings
-
Settings saved in
.vscode/settings.jsoninside the folder
Quick navigation and file actions using the explorer.
- Use the sidebar to browse and manage files
- Right-click for options: Rename, Delete, Duplicate, etc.
A code preview on the right side of the editor.
- Helps scroll through large files
-
Can be turned off in settings:
"editor.minimap.enabled": false
Distraction-free coding environment that hides UI elements.
-
Open with
View → Appearance → Zen ModeorCtrl+K Z - Use
Esc Escto exit
Write HTML and CSS faster using Emmet abbreviations.
Type: ul>li*5 and press Tab
Output: <ul><li></li>...</ul>
Automatically formats your code according to rules.
-
Right-click → Format Document or press
Shift+Alt+F - Install formatters like Prettier or ESLint for better results
VS Code Advanced Tools and Productivity
Used for real-time preview of HTML/CSS/JS changes in the browser.
- Install Live Server from the Extensions tab
- Right-click on an HTML file → Open with Live Server
- The browser auto-refreshes on file save
Snippets are reusable code templates you can insert quickly.
- Go to File → Preferences → User Snippets
- Select a language or global snippets
- Define patterns and bodies of code to expand
"Print to console": {
"prefix": "log",
"body": ["console.log('$1');"],
"description": "Log output to console"
}
Allows editing multiple lines at once.
-
Hold
Alt(Windows/Linux) orOption(Mac) and click in multiple places - Or use
Ctrl + Alt + ↓ / ↑to add cursors
- Prettier – Code formatter
- ESLint – JavaScript linter
- Live Share – Real-time collaboration
- Bracket Pair Colorizer – Highlights matching brackets
- Path Intellisense – Autocomplete for file paths
Work on remote servers or containers from VS Code.
- Install the Remote – SSH extension
- Connect to a remote machine via SSH
- You can also use Remote – Containers or Codespaces
Security feature that controls what code can run in a project folder.
- When you open a folder, VS Code asks whether to trust it
- Trusted folders allow tasks, extensions, and scripts to execute
Shows a tree structure of your current file’s contents (functions, classes, etc.).
- Located in the Explorer sidebar
- Helps with navigating large files
Quickly see or jump to a function/variable’s definition.
-
Right-click → Peek Definition or press
Alt+F12 - F12 to go directly to the definition
Use shortcuts to speed up development:
Ctrl+P: Quick file openCtrl+Shift+P: Open Command PaletteCtrl+Shift+F: Search across filesAlt+Shift+F: Format document
Run VS Code from a USB drive with user settings and extensions included.
- Download VS Code ZIP version (not installer)
- Create a
datafolder inside the extracted folder - Run
Code.exe— all data stays in that folder
Visual Studio Code Reference Links
Comprehensive and up-to-date guides on every feature of VS Code including debugging, settings, Git, and extensions.
https://code.visualstudio.com/docs
If you want to build custom extensions or integrate with VS Code, this API documentation is for you.
https://code.visualstudio.com/api
Search and explore thousands of official and community-made extensions for every development need.
https://marketplace.visualstudio.com/vscode
The open-source code base of VS Code is hosted on GitHub.
https://github.com/microsoft/vscode
A great guide with tips, shortcuts, and productivity tricks directly from the creators.
https://github.com/microsoft/vscode-tips-and-tricks
Watch tutorials, feature demos, and live sessions by the official VS Code team.
https://www.youtube.com/c/Code
A curated list of extensions, themes, tools, and resources for VS Code maintained by the community.