question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

[remote] Prefer to open a file in an existing window even when that window is connected to a remote with that file opened

See original GitHub issue

Does this issue occur when all extensions are disabled?: Yes

image

You open a project that has aĀ .devcontainerĀ folder, and vscode asks you to ā€œreopen in devcontainerā€, so you open the devcontainer.

You now have one vscode window of a project in a devcontainer.

Reproducing:

  • You navigate to another application, such as file explorer or GitHub desktop and find a file in the project youā€™re working on, which exists in the devcontainer.

  • You right click on the file, and you can choose an option in windows explorer to ā€œOpen with codeā€ or in GitHub desktop ā€œopen in Visual Studio Codeā€.

It doesnā€™t matter which option you take, you click the menu item.

(I reckon it would also be an issue for just generally opening filetypes that have code as the default opener)

Behaviour:

vscode will now open this file in a brand new vscode window, outside of the devcontainer.

We think the preferred behaviour should be for vscode to detect that this file the user has requested to be opened exists in both the filesystem and in the open devcontainer, and translate that file path to devcontainer/WSL language and open it in the existing devcontainer/remote wsl window.

This is referenced in an issue here and I just wanted to check and see if this is expected or if itā€™s an actual bug.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:29
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Sonejicommented, Aug 13, 2021

@ADustyOldMuffin would you be able to update the original post with my description here Letā€™s hope we can get 20 upvotes

1reaction
Sonejicommented, Aug 11, 2021

I think you misunderstand.

Let me write a flow for you to replicate/understand the issue: Setup:

  • You open a project that has a .devcontainer folder, and vscode asks you to ā€œreopen in devcontainerā€, so you open the devcontainer.
  • You now have one vscode window of a project in a devcontainer.

Reproducing:

  • You navigate to another application, such as file explorer or GitHub desktop and find a file in the project youā€™re working on, which exists in the devcontainer.
  • You right click on the file, and you can choose an option in windows explorer to ā€œOpen with codeā€ or in GitHub desktop ā€œopen in Visual Studio Codeā€.
  • It doesnā€™t matter which option you take, you click the menu item.
  • (I reckon it would also be an issue for just generally opening filetypes that have code as the default opener)

Behaviour:

  • vscode will now open this file in a brand new vscode window, outside of the devcontainer.
  • We think the preferred behaviour should be for vscode to detect that this file the user has requested to be opened exists in both the filesystem and in the open devcontainer, and translate that file path to devcontainer/WSL language and open it in the existing devcontainer/remote wsl window.
Read more comments on GitHub >

github_iconTop Results From Across the Web

"Open Remote" Window gets behind "Open" and inaccessible
The problem occurs when the "Open New or Existing File" dialog is displayed right after opening FileMaker Pro and you then click on...
Read more >
Supported RDP properties with Remote Desktop Services
Determines whether the remote session window appears full screen when you launch the connection. - 1: The remote session will appear in a...
Read more >
How to View and Close Open Files in Windows Server SMB ...
Open the Computer Management console on your file server (or connect to the server remotely from the management console running on your computer)Ā ......
Read more >
How To Use a Remote Desktop Connection On Windows - HP
To access files without carrying thumb drives or hard drives back and forth, ... Even so, you can still access Windows 10 remote...
Read more >
Remote Development using SSH - Visual Studio Code
You can also use the code command line from this same terminal window to perform a number of operations such as opening a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found