microsoft / microsoft/vscode-remote-release

Support `--goto` with dev containers

Open
#11,548 1 comment 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Mar 23, 2026.

containers
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

For a file opened locally, we can run code -g [file]:[line]:[column] to open the file at the specified location.

However, it seems completely impossible to do this with dev container.

I tried:

code \
--folder-uri vscode-remote://attached-container+[container-hex]/path-to-project \
--file-uri vscode-remote://attached-container+[container-hex]/path-to-project/file.ext:5:10
code \
--folder-uri vscode-remote://attached-container+[container-hex]/path-to-project \
-g vscode-remote://attached-container+[container-hex]/path-to-project/file.ext:5:10

But it doesn't work.

I also tried with docker exec and devcontainer exec, but it doesn't work either.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.