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
Install dependencies:
npm install
Build the extension:
npm run compile
Run in development:
Press F5 to launch Extension Development Host
Or use npm run watch for continuous compilation
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: