Skip to content

Make .devcontainer and .vscode port references configurable #3119

Description

@pamelafox

Summary

Follow-up to #3116. The .devcontainer/devcontainer.json port forwarding and .vscode/tasks.json / .vscode/launch.json still hardcode port 50505. These should ideally be configurable for parallel worktree usage.

Context

PR #3117 made app/start.sh, app/start.ps1, and app/frontend/vite.config.ts configurable via PORT and BACKEND_PORT env vars. However, VS Code config files don't natively support env vars with defaults, making this non-trivial.

Files affected

  • .vscode/tasks.json (line 62): "-p", "50505"
  • .vscode/launch.json (line 25): "-p 50505"
  • .devcontainer/devcontainer.json (line 27): port forwarding

Challenges

VS Code's variable substitution (${env:PORT}) resolves to empty string when the env var is unset — there's no way to specify a default. Possible approaches:

  • Accept that each worktree edits their own .vscode/ files (since each worktree has its own copy)
  • Require developers to set PORT before opening VS Code (PORT=50506 code .)
  • Use a VS Code extension or input variable (adds friction)

Acceptance criteria

  • Developers running two worktrees can use different ports without manual edits, OR clear documentation explains how to change the port per-worktree.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions