See which process is listening on which port and kill it without leaving the editor.
For the "address already in use" moments: a server that did not shut down, a debug session that left its port behind.
All listening TCP ports — port, PID, process name, address and command line in one table.
Search — filter by port, PID, process name or any part of the command line. Click a column to sort.
Kill — select one or more rows (Ctrl / Shift click) and kill the processes with the button, Delete or the
context menu. Nothing is killed without confirmation; the editor itself and the operating system process are refused.
Port Killer: Kill Process on Port… — type a port number in the Command Palette and free it.
Windows, macOS and Linux — uses the tools of the operating system; nothing leaves your machine.
Usage
Open the Port Killer tab in the bottom panel (or run Port Killer: Show). F5 lists the ports again.
How it works
System
Ports
Kill
Windows
netstat -ano, names and command lines from one CIM query
taskkill /F
macOS, Linux
lsof -nP -iTCP -sTCP:LISTEN, or ss -ltnp when lsof is missing
kill -9
A process of another user or a system service can only be killed when VS Code runs with enough rights
(as administrator on Windows).