Comments (6)
Hey @ts0818 can you expand on what you mean by devbox services? Are you running a web server as a devbox service locally? or is it hosted somewhere else?
We have built support to connect to devbox.sh instances from VSCode. But I need to understand your use case a bit better to see if what you're asking is possible and just lacks documentation, or if we need to build it.
from devbox.
Thanks for the quick reply.
I don't understand the devbox service very well.
It said that it was inspired by docker compose, so
I thought I could connect using something like docker exec.
As an image, a connection like Visual Studio Code's devContainer,
I would like to know if it is possible for devbox service as well.
I have two machines, local and remote, the devbox service is conducted remotely and I want to connect remotely from my local Visual Studio Code.
from devbox.
@ts0818 oh I see.
Devbox service and devbox shell don't create a virtualization layer like Docker to run your processes. What you're running in a devbox service is running on your machine as a process. So if you want to connect your VSCode to the remote environment, you should connect to the host machine that is running your devbox process via SSH following this guide.
If you want to actively develop using your local VSCode but in the remote environment, you can connect your VSCode to the remote machine using VSCode's remote ssh extension.
Hope this helps. If your use case is different than this, let me know if I can help.
from devbox.
@mohsenari
Thank you for your detailed explanation.
I understand.
your explanation is very good,
For many people, it would be great if you could add it to the documentation.
I think it's useful.
from devbox.
If I should start a new thread, please let me know.
My question is about the Reopen in devbox shell environment
command that gets added by this plugin.
When I attempt to run this from a machine that's in a devbox
project on a remote machine (using the ssh remote tooling), vscode closes as though it's about to restart, but never restarts.
Details:
local machine - pop-os
remote machine - windows wsl ubuntu
ssh - tailscale
Probably goes without saying, but this is an issue for VSCode tools that depend on a devbox
-managed package (vale
in my case).
Would love to hear from anybody that has this working/sees an obvious issue I'm not considering.
from devbox.
@em-jones apologies for late response, I missed this message somehow.
The Reopen in devbox shell environment
command doesn't work if your VSCode is connected to a remote environment. The reason for that is because when Reopen in devbox
is called, devbox extension in VSCode does the following steps (excluding other details):
- VSCode spawns a devbox CLI subprocess in the host machine (same machine that is running VSCode).
- VSCode opens an inter-process communication channel between the newly opened subprocess and VSCode.
- The subprocess sets up devbox shell environment (as if you called
devbox shell
via devbox CLI). - Once done, lets VSCode know that the new devbox shell environment is ready so VSCode closes itself.
- Subprocess then calls runs
code .
to open VSCode in the new devbox shell environment. - Subprocess terminates itself.
This "dance" between VSCode and a devbox subprocess gets very fragile and error-prone when I tried testing it in VSCode connected to a remote environment as well as VSCode (in Windows) connecting WSL environment. So at least for the time being we don't have these 2 use cases figured out.
Sorry for disappointing answer but I thought I should at least give you context on why it doesn't work. For your case, I think the subprocess creates a new devbox shell environment, VSCode closes itself, but the subprocess fails to open a new VSCode window.
from devbox.
Related Issues (20)
- Cannot find flake in the flake registries when instaling python311Packages.torch-bin
- Add name/description to devbox init
- `refresh` alias overwrites init_hook
- Add ability to pass arbitrary flags to process-compose
- Use devbox project to manage utilities like process compose.
- Running a script inside devbox shell throws `file not found` error HOT 3
- Configurable plugins
- Provide `devbox (global) outdated`
- Request to add hyperdb-python
- CLI Login Prompt has weird interactions with VSCode extension
- [Package Issue Report]: protobufjs-cli
- Start of container with generated Dockerfile is super slow
- Error installing [email protected] HOT 1
- VS Code terminal somehow start devbox shell HOT 1
- devbox shell cannot start (error in the nix version detection)
- devbox shell cannot find the userid and groups and group names on a Linux VDI that uses LDAP for IAM HOT 7
- kicad5, kicad6, and kicad7
- Jetbrains IDE, rubymine
- Cannot set PATH env var in both a plugin and devbox.json
- Devbox executes local flakes in pure mode, even if `--pure` is not specified.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devbox.