Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Port Killer ProNew to Visual Studio Code? Get it now.
Port Killer Pro

Port Killer Pro

abhi-sh4rma

|
2 installs
| (0) | Free
Kill processes running on specific ports with manual input or auto-detection from project files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Port Killer Pro

Version Downloads Rating

A powerful VS Code extension that helps you kill processes running on specific ports, with both manual and auto-detection capabilities. Perfect for developers who frequently need to free up ports during development.

Features

🎯 Manual Port Killing

  • Enter any port number to kill the process running on it
  • Validates port numbers (1-65535)
  • Cross-platform support (Windows, macOS, Linux)

🔍 Auto-Detection

  • Automatically detects ports from common project files:
    • .env files (PORT=3000, SERVER_PORT=8080, etc.)
    • package.json scripts (--port 3000)
    • Django manage.py (runserver 0.0.0.0:8000)
    • Docker Compose files (ports: "3000:3000")
    • .env.local, .env.development
  • Shows confirmation dialog before killing detected ports

🛡️ Safe & Reliable

  • Uses proper async/await patterns
  • Comprehensive error handling
  • Confirmation dialogs to prevent accidental kills
  • Graceful handling of non-existent ports

Quick Start

  1. Install dependencies:

    npm install
    
  2. Build the extension:

    npm run compile
    
  3. Run in development:

    • Press F5 to launch Extension Development Host
    • Or use npm run watch for continuous compilation
  4. Use the extension:

    • Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
    • Run either:
      • Kill Port (Manual) - Enter port number manually
      • Kill Port (Auto-detect) - Auto-detect from project files

Commands

Command Description
port-killer.killPort Kill a process on a manually specified port
port-killer.autoDetect Auto-detect port from project files and kill

Supported File Patterns

The auto-detection feature recognizes these patterns:

Environment Files (.env, .env.local, etc.)

PORT=3000
SERVER_PORT=8080
APP_PORT=5000
NODE_PORT=4000

Package.json Scripts

{
  "scripts": {
    "start": "node server.js --port 3000",
    "dev": "nodemon --port 8080"
  }
}

Django manage.py

python manage.py runserver 0.0.0.0:8000

Docker Compose

services:
  web:
    ports:
      - "3000:3000"
      - "8080:80"

Platform Support

Platform Tools Used
Windows netstat, taskkill
macOS lsof, kill
Linux lsof, ss, kill

Development

Running Tests

npm test

Building for Production

npm run vscode:prepublish

Requirements

  • VS Code 1.50.0 or higher
  • Node.js (for development)
  • Platform-specific tools (netstat, lsof, etc.) must be available in PATH

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft