vscode-remote-release
vscode-remote-release copied to clipboard
Opening single-folder workspace does not open editor within folder
Problem
I like to use workspaces to isolate and organise all of my projects using the Workspace Explorer extension, which has worked wonders for me as of late. I also use devcontainers in all of my projects and am solely a user of Linux for development (will get to why that last point is important soon).
Every time I open a workspace through the extension or by opening a .code-workspace file, the contents always show the folder itself within the explorer:
This wouldn't be a problem if my devcontainer could be read, yet for some reason whenever my project is opened in this way, VS Code prompts me to create a new devcontainer every time.
Compare this to when I open the folder itself (or drag it from the top into the center of VS Code):
Works fine, devcontainers are picked up, everything works.
Ever since I distro-hopped from Ubuntu to Fedora, I've had this issue crop up when I didn't on Ubuntu, and have been planing to spin up my configuration on a Ubuntu VM to see if it persists or if I've misconstrued a coincidence.
Anything that I might be doing wrong? I love my devcontainers and really don't want to port away from them. :(
Steps to Reproduce
- Open project folder in VS Code (I normally drag the folder from my file manager into VS Code)
- Create a workspace - this should auto-enter you into it
- Close workspace
- Re-open workspace
Version Info
VS Code
Version: 1.92.0 Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124 Date: 2024-07-31T23:26:45.634Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Linux x64 6.9.12-200.fc40.x86_64
Local OS
Operating System: Fedora Linux 40 KDE Plasma Version: 6.1.3 KDE Frameworks Version: 6.4.0 Qt Version: 6.7.2 Kernel Version: 6.9.12-200.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor Memory: 23.4 GiB of RAM Graphics Processor: AMD Radeon RX 580 Series Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7A38 System Version: 8.0
Remote OS
N/A
Remote Extension/Connection Type
N/A
Logs
Does this issue occur when you try this locally?: Yes Does this issue occur when you try this locally and all extensions are disabled?: Yes
Because my description is so large I felt it'd be easier to digest using this format, hope it doesn't get in the way.
Is there anything extra I need to supply for this to be looked at by chance?
Thanks for opening.
I'm having trouble reproducing - here's what I did:
- Open a repo in VS Code
- Add a
.code-workspacefile to it - Reopen in the workspace
- I'm prompted to reopen in a dev container by the Dev Containers extension (as it detects a devcontainer.json, which is good)
- I tried your steps of closing the workspace and then reopening it
- I'm still prompted again to reopen in a dev container:
@cyrus01337 are my steps different from yours?
I normally open a folder to be used as a project, create the devcontainer, then save what I have open to a workspace file. Normally I am inside of the project folder, so it's name doesn't really pop up as shown here:
Compared to here where it does:
When opening the workspace file afterwards, I end up with the 2nd image. It's possible that an update may have resolved this however, so I'll look into this and see if the issue persists.
Hey @chrmarti, this issue might need further attention.
@cyrus01337, you can help us out by closing this issue if the problem no longer exists, or adding more information.
I'm a bit lost on what other context would need to be provided here, I will try to narrow down what the problem could be with a default VS Code installation when I get the time.
When you use a .code-workspace file the Dev Containers extension looks for the .devcontainer folder in the folder where the .code-workspace file is.
It might make sense to also support using any devcontainer.json inside the workspace folders (there can be multiple when using a .code-workspace file).
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!