Port Manager Dashboard
Shows which process holds each listening port and stops it with one click. Linux and macOS.
Using it
- Port Manager in the activity bar is a live dashboard of dev ports (1024–32767 by default):
totals for ports, memory and CPU, a bar showing how memory splits across ports, and one card per
port. Each card shows the command, its folder, how long it has run, a
background or
terminal tag, a via npm › next tag for whatever launched it, and CPU and memory charts covering the last few minutes. Memory and CPU include
the server's child processes. Filter by port, command or folder, and sort by port, memory or CPU.
- Click a card's header for the full command, folder, PID and address.
- ■ Stop asks on the card itself, then stops the server. A wrapper that exists only to run it,
such as
nodemon, npm run, pnpm or sh -c, is stopped with it, so nodemon cannot restart the
server and take the port again. A wrapper that runs other things too, such as turbo dev, is left
alone. The icons beside Stop open the port in a browser, open a terminal in its folder, and copy
the PID.
- In a terminal, Ctrl+click an
EADDRINUSE … :3007 error to free that port.
- Command Palette: Ports: Free a Port… (type
3007), Ports: Stop Ports… (pick several).
Stopping sends SIGTERM, waits 3 seconds, then SIGKILL. VS Code's own processes are locked. Ports
owned by another user, for example a system mongod, appear only with Show All Ports, and need
sudo fuser -k <port>/tcp to stop.
Settings
| Setting |
Default |
Meaning |
portManager.portRange |
1024-32767 |
Ports to list, for example 3000-3999 |
portManager.showAllPorts |
false |
List every port, including other users' |
portManager.refreshSeconds |
5 |
Refresh interval while the sidebar is open; 0 = manual |
portManager.confirmBeforeStop |
true |
Ask before stopping |
| |