Skip to content

Add Hello World extension demonstrating VS Code extension development patterns #257754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 25, 2025

This PR adds a complete "Hello World" extension to the VS Code repository that serves as a comprehensive example and template for VS Code extension development within the main codebase.

Features Added

The Hello World extension includes:

  • Two interactive commands:
    • Hello: Hello World - Shows a simple greeting message
    • Hello: Show Workspace Info - Displays current workspace information
  • Keyboard shortcut: Ctrl+Shift+H (or Cmd+Shift+H on Mac) for the Hello World command
  • Complete TypeScript setup with proper compilation and type checking
  • Cross-platform build scripts (build.sh and build.bat)
  • Validation script to verify extension functionality
  • Basic test structure demonstrating extension testing patterns
  • VS Code debug configuration for easy extension development and testing

Extension Structure

extensions/hello-world/
├── src/
│   ├── extension.ts          # Main extension implementation
│   └── test/
│       └── extension.test.ts # Basic test examples
├── out/                      # Compiled JavaScript output
├── media/                    # Extension assets directory
├── package.json              # Extension manifest with commands and keybindings
├── tsconfig.json            # TypeScript configuration
├── extension.webpack.config.js  # Webpack build configuration
├── build.sh/.bat            # Cross-platform build scripts
├── validate.js              # Extension validation script
└── README.md                # Comprehensive documentation

Development Integration

  • Added extension to build/gulpfile.extensions.js compilation list
  • Created VS Code launch configuration for debugging ("Launch Hello World Extension")
  • Follows existing VS Code extension patterns and coding standards
  • Includes proper Microsoft copyright headers and MIT licensing

Usage

Developers can use this extension as:

  1. Learning resource: Demonstrates core extension concepts like command registration, user interaction, and workspace access
  2. Template: Copy and modify for new extension development
  3. Testing: Verify extension development environment setup

Testing

To test the extension:

  1. Run ./build.sh (or build.bat on Windows) to compile
  2. Open VS Code in repository root
  3. Go to Debug view (Ctrl+Shift+D)
  4. Select "Launch Hello World Extension"
  5. Press F5 to start Extension Development Host
  6. Use Ctrl+Shift+P and type "Hello" to see commands

This extension demonstrates essential VS Code extension development patterns including command registration, user interaction, workspace access, keyboard shortcuts, proper TypeScript compilation, and extension lifecycle management.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] build a hello world extension Add Hello World extension demonstrating VS Code extension development patterns Jul 25, 2025
@Copilot Copilot AI requested a review from osortega July 25, 2025 01:55
Copilot finished work on behalf of osortega July 25, 2025 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants