See what's listening, find the right port instantly, and free it with one click — right inside VS Code.
The two most-installed port extensions are abandoned and unreliable, and VS Code's built-in Ports view is for tunneling — it can't tell you what owns a local port or kill it. Port Kill does exactly that.
Features
- Live port list in its own Activity Bar view — every listening TCP/UDP port with its process, PID, and bind address. Auto-refreshes while visible.
- Search & kill (
Port Kill: Search & Kill Port) — fuzzy-search by port number or process name and kill from the picker. - Smart suggestions — known dev ports in use are surfaced first and labeled (
3000 — React/Next.js,5432 — PostgreSQL,6379 — Redis, …). - One-click kill with a confirmation modal (graceful
SIGTERM→SIGKILL,taskkill /F /Ton Windows). - Docker aware — maps published host ports to their container name/image.
- Process identity, not just a PID — framework/service labels, command, user.
- Kill all dev ports in one action.
- Cross-platform — macOS (
lsof), Linux (ss/lsof), Windows (Get-NetTCPConnection). - Safe by default — hides system/IDE processes and confirms before killing.
Usage
Open the Port Kill view in the Activity Bar (plug icon). Hover any row for inline Kill / Open in browser actions, or right-click for copy actions. Use the status-bar plug counter or Port Kill: Search & Kill Port for the fast search flow.
Settings
| Setting | Default | Description |
|---|---|---|
portKill.confirmBeforeKill |
true |
Confirm before killing a process. |
portKill.refreshInterval |
3000 |
Auto-refresh interval (ms) while the view is visible. 0 disables. |
portKill.showStatusBar |
true |
Show the active-dev-port count in the status bar. |
portKill.hideSystemProcesses |
true |
Hide common system/IDE processes. |
portKill.groupBy |
category |
Group ports by category, or none for a flat list. |
portKill.killSignal |
graceful |
graceful (TERM→KILL) or force (KILL immediately) on Unix. |
Notes
- Desktop only — listing and killing ports requires local OS access.
- Killing a root/other-user process needs elevated privileges; Port Kill reports a clear error instead of failing silently.
- A Docker-published port is held by
docker-proxy; killing it stops the forward, not the container's internal service.
Development
npm install
npm run watch # esbuild watch
# press F5 in VS Code to launch the Extension Development Host
npm run typecheck
npm run package # production bundle
License
MIT