microsoft / microsoft/vscode-livepreview

Silent failure when default port (3000) is already in use — no error notification or Output channel entry

Open
#815 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
596
Forks
119
Avg merge
1d 4m
Merged PRs (30d)
5

Description

Environment

  • Extension: Live Preview v0.4.18
  • VS Code: Remote - SSH (remote host: Linux/Ubuntu 24.04)
  • Extension host: Remote (extension runs server-side)

Steps to Reproduce

  1. Have port 3000 already occupied by another process on the remote host.
  2. Open an HTML file in VS Code.
  3. Run Show Preview (Internal Browser) from the Command Palette or editor context menu.

Expected Behavior

  • An error notification is shown (e.g. "Live Preview: port 3000 is already in use. Change livePreview.portNumber in settings.")
  • OR the Live Preview Output channel logs a clear error message
  • OR the extension automatically retries on the next available port

Actual Behavior

  • The command silently does nothing.
  • No notification appears.
  • The Live Preview channel does not appear in the Output panel dropdown at all — there is no indication the extension even attempted to start.
  • Right-click → Show Preview from the editor context menu also silently fails with no feedback.

Workaround

Set livePreview.portNumber to a free port in workspace settings:

"livePreview.portNumber": 3900

After this change, Show Preview works immediately.

Impact

The failure mode is completely invisible. There is no way to diagnose this without external tools (ss -ltnp / netstat). A user would have no idea the problem is a port conflict. The extension should surface a human-readable error or warning notification when it cannot bind to the configured port.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conflict with port 3000 occupied, then trace the Show Preview (Internal Browser) command and the live server startup path. Inspect how the configured livePreview.portNumber is bound and how failures are reported. Done means a port conflict produces a clear notification or Live Preview Output entry, with coverage for the failing startup case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
backend, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.