Development Environment Setup
VS Code provides a comprehensive development environment with pre-configured tasks, launch configurations, and tooling.Editor Configuration
The repository includes VS Code workspace settings optimized for development:TypeScript
- Tabs for indentation (not spaces)
- Real-time compilation feedback
- Strict type checking enabled
Tasks
- Pre-configured build tasks
- Watch mode tasks
- Test runner tasks
Extensions
- ESLint integration
- TypeScript language features
- Debug adapters
Launch Configs
- Multiple debug configurations
- Compound launch setups
- Test runner integrations
Architecture Overview
Understanding the codebase structure is essential for effective development:Core Source Structure (src/)
- Base Layer
- Platform Layer
- Editor Layer
- Workbench Layer
- Code Layer
src/vs/base/ - Foundation utilities and cross-platform abstractions- Common data structures (arrays, maps, events)
- Platform-agnostic utilities
- Basic UI components
- No dependencies on other VS Code layers
Built-in Extensions
Theextensions/ directory contains first-party extensions:
- Language features:
typescript-language-features/,html-language-features/,css-language-features/ - Core features:
git/,debug-auto-launch/,emmet/,markdown-language-features/ - Themes:
theme-*folders - Development tools:
extension-editing/,vscode-api-tests/
Coding Guidelines
Naming Conventions
Indentation and Style
VS Code uses tabs, not spaces for indentation. This is enforced by ESLint.
String Handling
UI Labels
Use title-style capitalization for UI elements:Code Quality Requirements
TypeScript Strictness
- No
anyorunknownwithout justification - Proper type annotations required
- Define interfaces for complex types
Development Tasks
Compilation and Building
Code Quality Checks
Run these checks before committing:TypeScript Compilation
Check for compilation errors:Monitor the watch task output for real-time errors:
Specialized Compilation Checks
Working with Extensions
Building Extensions
Downloading Built-in Extensions
Some extensions are not included in the repository:Updating Dependencies
Grammar Updates
Update language grammars:Localization
Update localization extension:TypeScript Version
Update to latest TypeScript:Performance Testing
Run performance benchmarks:Common Development Workflows
Feature Development
Reload Window
In the running VS Code instance:
- Press
Cmd/Ctrl + Rto reload - Or use Command Palette: “Developer: Reload Window”
Bug Fixing Workflow
Find Related Code
- Use semantic search for general concepts (Glob tool)
- Use grep for exact strings/error messages
- Follow imports to understand dependencies
- Check test files for usage patterns
Debug the Issue
Launch VS Code with debugger (see Debugging)
CI/CD Integration
The repository includes CI/CD scripts:Tips and Best Practices
Use Watch Mode
Use Watch Mode
Always develop with watch mode running (
npm run watch) for instant feedback on TypeScript errors.Leverage Launch Configurations
Leverage Launch Configurations
Use the pre-configured launch configurations in
.vscode/launch.json for debugging different processes:- Main Process
- Extension Host
- Shared Process
- Search Process
Check Layer Dependencies
Check Layer Dependencies
Before importing from another module, verify it’s allowed by the layer architecture:
Test as You Go
Test as You Go
Run relevant tests frequently during development:
Clean Builds When Needed
Clean Builds When Needed
If you encounter strange issues, try a clean build:
Next Steps
Debugging
Learn how to debug VS Code itself
Running Tests
Understand the testing infrastructure
Building from Source
Review build instructions
How to Contribute
Read the full contribution guide