10 ms·
Vscode.dev: Local Development with Cloud Tools
- api 3y agoWhy?
- nine_zeros 3y agoSomeone's promotion packet.
- orangea 3y agoVS Code, for better or for worse, has evolved into something like an operating system or programming language VM, capable of running apps (extensions) which do useful things while only interacting with the VS Code extension API. This allows one to use such "apps" without installing VS Code. Theoretically, one could run code in vscode.dev if an extension provides a programming language runtime. I'm not sure if there are any extensions which do this yet. It is interesting to think about how many general-purpose VM-like abstraction layers are sitting on top of each other to run this — the operating system provides an interface which the browser uses, the browser provides an interface which vscode.dev uses, vscode.dev provides an interface which an extension implementing a programming language runtime uses, and the program uses the runtime interface. Github Codespaces has the downside that you need to connect to a cloud computer and do all your development remotely on the cloud computer, which causes issues such as lag, the need to pay money for the service, inability to use it without an internet connection, etc. This provides the benefits (however small) of a development environment running in the browser without those downsides.
- sdesol 3y ago> VS Code, for better or for worse, has evolved into something like an operating system Microsoft fully understands how valuable VS Code is and they are doing everything they can to keep developers interested, which is shaping its evolution. I have yet to find another open source project that has the same community involvement as vscode (https://devboard.gitsense.com/microsoft/vscode https://devboard.gitsense.com/microsoft/vscode). The closes that I have found is vercel's next.js https://devboard.gitsense.com/vercel/next.js https://devboard.gitsense.com/vercel/next.js Full Disclosure: This is my tool
- Zambyte 3y ago> I have yet to find another open source project that has the same community involvement as vscode Emacs. I mention this specifically because it's clear that VS Code is heavily inspired by Emacs in all the ways that you describe.
- Barrin92 3y agoVsCode is basically Javascript-Emacs but people really react with something between bother and disgust to that comparison. The extensibility on top of a very generic core has even encouraged a lot of comparable extensions. Like Roam/Org clones that basically function like org-mode or bespoke git clients. VsCode is very quickly becoming a platform for software.
- hollerith 3y agoThat might be true, but I found it easy 30 years ago to learn how to modify Emacs, but spent 100s of hours trying to learn how to exert a similar level of control over VSCode, and never saw any significant signs I was getting close to my goal. Profession web developers might have a different experience.
- bitwize 3y agoI agree with you that extending Visual Studio Code is a quite different experience, more akin to pulling teeth or writing COM controls in C++ in the 90s than to extending Emacs, which can be done live in your editing session as you work. But. Seventy-five percent of developers use Visual Studio Code, with most of the rest being vim, neovim, or JetBrains holdouts. All of the brainpower for extensions and tooling integration is going into Visual Studio Code, not Emacs. Soon, Emacs will simply be left behind.
- sdesol 3y agoI'm definitely one of those vim holdouts, even though vscode vim support is pretty good. If vscode ever supports ctrl-z to jump into a full terminal and fg to jump back into editor mode, then I'll definitely convert.
- deleted 3y ago[deleted]
- 000ooo000 3y agoI wonder what kind of developers (i.e. demographics, place in career, tec preference etc) want to use a set up like this. I like my local development to be very local with as few links in the chain/surprises as possible, but maybe I'm just a crusty luddite.
- deleted 3y ago[deleted]
- orangea 3y agoMy guesses: - People who don't own a computer, e.g. university students who only use the school's computers (or K-12 students even), but who still want their editor settings to be automatically saved and used, and who don't want to deal with installing things on the computers they use (or can't install things). - People who own multiple computers and who don't want to deal with syncing configuration such as installed tools, editor settings, etc.
- Nanana909 3y agoThird option: People who own a computer but prefer the iPad form factor, (taller aspect ratio is nice for code), and like having a portable 120Hz whiteboard, and arent afraid of operating said computer remotely via the iPad.
- data-ottawa 3y agoDoes VSCode.dev work well on iPad? I tried it a year or two ago and I had issues with the keyboard shortcuts (had to disable keyboard shortcuts on ipados) and scrolling behaviour. I seem to recall having other issues with safari and the local files but it’s been a while. I’m not in a place I can try it out, but if it works then that would open up remote web development.
- Vermyndax 3y agoYes, it works on the iPad well enough. Safari doesn't support the local files feature (due to security) but it works, as others have said, in a pinch. If you save it as a shortcut to your Home Screen, it almost comes across as a native app.
- codeonline 3y agoNot totally related to the above but I have to say I love the vscode dev containers experience. I am working on a few projects in the clinical research field with complex combinations of languages ,stacks and dependencies and love that we can bundle a complete development environment into the repo along with infra declared via docker compose.
- mbreese 3y agoSpecifically for clinical research, how do you deal with the cloud aspect? I’m a big fan of devcontainers, but can’t use cloud environments for security concerns — everything must be local. And setting up a local tunnel to vscode.dev is also not possible. Do you have development in one environment and data in another?
- explaininjs 3y agodevcontainers has nothing to do with cloud per say. It’s an open spec you can run fully locally.
- mbreese 3y agoRight, which I do locally. But, I used to use vscode’s server version directly on my remote server. Microsoft has recently made this impossible to do with their branded version of VSCode, instead opting to force people to make tunnels from potentially secured servers to vscode.dev. I was more curious is the parent had figured out a way around this. The server module from Openvscode and coder.com still both work for remote access, but you don’t get to use the Microsoft marketplace from those versions. And now that I’m thinking about it more, I’m not sure if you can even use the devcontainer function from the server vscode (or vscode.dev) in the first place.
- explaininjs 3y agoHm okay. There’s always the Remote-SSH extension. Not web-enabled, but I’ve never really seen a compelling web use case anyways.
- paxys 3y agoFYI – you can go to github.dev (or press "." while browsing any repository) to get the same VS Code online experience, additionally with the repo automatically loaded into it. Something else I find very confusing is that vscode.dev & github.dev are both free and run the editor fully locally in your browser. Github Codespaces on the other hand provisions a VM behind the scenes so you can run containers, build tooling and whatever else alongside the editor. That one charges by the hour.
- downvotetruth 3y agoDoes not appear to work in FF Edit: Just tried with 115 on an Ubuntu install and that does work with both normal & ESR 102.6. In console, get error: "No measure found in Performance API for "start.block: Bootstrap" and a 404 warning for assets.github.com/static/primer.css
- LatticeAnimal 3y agoWorks for me in FF 115.0.2 and has worked for many months on previous versions.
- easton 3y agoI use it at work in FF. Maybe you have an extension installed that’s intercepting the “.”?
- orangea 3y agoYou have to be logged in to github for it to work.
- deleted 3y ago[deleted]
- downvotetruth 3y agoThe issue is that when resistFingerprinting is set to true in about:config it results in the error and stopping the JS redirect to the login screen. Interestingly, this also appears to be why windy.com broke a few weeks ago.
- amanzi 3y agoI've known about this for a while, but have only just noticed a new (to me, at least) feature: Remote Tunnels Docs: https://code.visualstudio.com/docs/remote/tunnels https://code.visualstudio.com/docs/remote/tunnels This is super useful for me - this would let me easily connect back to my desktop PC at home while I'm away or connected to other networks.
- OptoContrarian 3y agoI use tunnels to access my entire dev environment within my Quest Pro.
- yaysyu 3y agoHow often and for how long do you code like this? What has your experience been like? I always find the idea of coding in VR intriguing but am unsure of what the actual experience would be like.
- cubefox 3y agoDoes developing like this for an extended period of time actually work?
- cgijoe 3y agoIf you don't mind my asking, I am honestly curious about this. Is the QPro high enough resolution to do actual dev work inside it?
- 3y ago
- rbut 3y agoIf you dont like the idea of having your dev environment in the cloud, coder have a self-hostable vscode docker image: https://github.com/coder/code-server https://github.com/coder/code-server
- mynameisvlad 3y agoThis loads files off your local device, hence the "local development" part of the title. The extensions might do things with your code (same as with Coder, albeit with a different marketplace) but the code doesn't live in the cloud a la GitHub/VS Codespaces.
- orangea 3y agoAlso see https://devpod.sh/ https://devpod.sh/ which has had quite a lot of exposure on HN recently.
- aitchnyu 3y agoDo these allow the IDE to navigate code, ie will an npm install hide away the node_modules inside the container and the IDE doesn't know about it?
- realharo 3y agoYou can just use the devcontainers feature in normal local VS Code (https://code.visualstudio.com/docs/devcontainers/containers https://code.visualstudio.com/docs/devcontainers/containers) Even the next version of IntelliJ will have partial support for them (https://blog.jetbrains.com/idea/2023/06/intellij-idea-2023-2-eap-6/#SupportforDevContainers https://blog.jetbrains.com/idea/2023/06/intellij-idea-2023-2...)
- tamimio 3y agoWhy would I use this compared to cloning my codebase/repo in my the other machine in a minute and continue my work? Or, use rsync to sync it across devices, or other means?
- orangea 3y agoYour question is answered fairly comprehensively by the other comments on this page which were posted before yours.
- tamimio 3y agoThanks for your reply, I thought they did but not entirely, it was all listing use cases that are specific, like a student or onboarding or using phone/tablet, which is all fair and useful in those cases maybe, but in a “normal” scenario, I find that might be an issue especially from security perspective, more machines connected means more access and possible unauthorized access in theory at least. As for the environment setup, using nixos can solve that hurdle as well.
- low_tech_punk 3y agoTop on my wish list is a solution for the Ctrl/Cmd + W key binding conflict with the browser tabbing system. Definitely a hard design problem when you put browser technology inside browser technology >_<
- coder543 3y agovscode.dev appears to default to Ctrl+F4... which is a solution for almost no one. I can't remember the last time I had a keyboard with fn-keys that weren't remapped to a bunch of other useful stuff.
- blackoil 3y agoThat's a default for Windows along with Alt+F4.
- cdcarter 3y agoIf you're in an environment where you're able to use Chrome, you can go to the kebab menu and select "Install Visual Studio Code", which will install and open the workspace as a "Progressive Web App". It will have its own dock/menu bar icon, you can ctrl/cmd-tab to it, and all keyboard shortcuts work natively. Unfortunately, at least on Mac OS, you can't exit Chrome entirely or the PWA will exit too.
- minimaxir 3y agoRandom question: how are files stored in this browser IDE? It seems like there's some sort of browser cache but I can't find the files in said cache.
- explaininjs 3y agoIndexedDB, mostly. File System Access, GitHub, and Azure DevOps API’s as appropriate.
- WorldMaker 3y agoAlso, the Remote Development extensions' API if you choose to use it. (You can run a vscode-server on a system of your choice and tunnel it to access it in vscode.dev.)
- ChrisArchitect 3y ago(2021)
- ilc 3y agoPlease read the terms of use before using this: https://www.microsoft.com/en-us/legal/terms-of-use https://www.microsoft.com/en-us/legal/terms-of-use Personal and Non-Commercial Use Limitation Unless otherwise specified, the Services are for your personal and non-commercial use. You may not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any information, software, products or services obtained from the Services. Embrace, Extend, Extinguish. The playbook hasn't changed. The wrapper has.
- naikrovek 3y agook so Microsoft choosing to license their VScode editor, that they created, however they choose, is "Embrace, Extend, Extinguish", now? explain
- croes 3y agoYou mean their version of what Atom did before and that only VS Code is allowed to use the VS Code marketplace. And of course things like this https://news.ycombinator.com/item?id=31760684 https://news.ycombinator.com/item?id=31760684 Embrace, Extend, Extinguish.
- WorldMaker 3y agoKey components of VS Code predated Atom by some years. VS Code started as the editor for the Azure Portal and was part of the Dev Tools in IE11 and Spartan Edge.
- naikrovek 3y agowhat are they embracing?! they made this on their own. they're allowed to license it however they want.
- ghuntley 3y agohttps://ghuntley.com/fracture https://ghuntley.com/fracture goes into this.
- 3y ago
- nickstinemates 3y agoI don't really like the idea of coding in a browser context, but I do like thin clients. So more access to working on code from different contexts can only be of benefit, even if I don't personally use it.
- IceWreck 3y agoWhy use this - a stripped down unusable version of vscode when you can host a full instance of vscode on your linux server https://github.com/coder/code-server https://github.com/coder/code-server
- boomskats 3y agoIn the least snarky way possible - so that you can avoid having to host a full instance of vscode on your linux server.
- ghuntley 3y agoBecause of https://ghuntley.com/fracture https://ghuntley.com/fracture - same problem applies that only official builds can access marketplace etc. (I use code-server day to day but it’s a problem. No real solution. Suggest folks look at https://GitHub.com/coder/coder https://GitHub.com/coder/coder to provision environments w/code-server btw)
- WorldMaker 3y agoYou can use vscode.dev to achieve something very similar: - Run a vscode-server on your server: https://code.visualstudio.com/docs/remote/vscode-server https://code.visualstudio.com/docs/remote/vscode-server - Connect (tunnel) to that code-server from vscode.dev using the Remote Development extension One small reason to do it with two steps like that as opposed to a single "box" of coder/code-server is that you get Microsoft hosting the bandwidth multiple megabytes of files to download and a reliable single PWA to install for however many linux servers you want to remote develop on.
- evrflx 3y agoSlightly related: Is somebody aware of a self host and opensource option for remote pairing using vscode/coder?
- adamddev1 3y agoThe announcement says that you can't use extensions that use node. I thought they might use WebContainers from StackBlitz to run node in webassembly with this? https://blog.stackblitz.com/posts/webcontainer-api-is-here/ https://blog.stackblitz.com/posts/webcontainer-api-is-here/ Or could use one for the tiny linux VMs running in WebAssembly, that could run anything...
- ogoffart 3y agoThat's not as trivial because extension that uses node also use the fact that this is the same node instance that runs vscode itself and use vscode API to do "things". Other things it does is accessing the file system or network which may anyway not work even in a WebContainer. It is pretty easy to port an extension to be able to run as a web extension as well. This is documented there: https://code.visualstudio.com/api/extension-guides/web-extensions https://code.visualstudio.com/api/extension-guides/web-exten... I've done that for my extension. My extension uses a language server through the Language Server Protocol (LSP). In order to make it work as a web extension, I had to compile the language server (written in Rust) to webassembly, and also hack a way to query "import" files via vscode api instead of file system access.
- CompuIves 3y agoThe editor on CodeSandbox runs web VSCode, and in that version we emulate Node.js in the browser to run local extensions.
- lioeters 3y agoI'm curious about the technical details. Could you elaborate on how CodeSandbox runs Node.js in the browser? Does it use a Linux VM like Alpine compiled to WASM?
- lioeters 3y agoOh I think I found the answer. > Nodebox is a runtime for executing Node.js modules in the browser. https://github.com/codesandbox/nodebox-runtime https://github.com/codesandbox/nodebox-runtime https://sandpack.codesandbox.io/docs/advanced-usage/nodebox https://sandpack.codesandbox.io/docs/advanced-usage/nodebox
- not_your_vase 3y agoHmmm... since VSCode is based on Electron/Chrome, it means that Chrome itself could be a webapp, and I could browse the internet using a Chrome instance that I have opened in Firefox?
- flohofwoe 3y agoI don't think that VSCode is bringing its own Chromium runtime when it is running as web application... (it's also not the 'complete' VSCode experience because it can only install extensions that are 'web compatible').
- ogoffart 3y agoNo. The native VSCode uses Electron/Chrome, but the web version of VSCode is (almost) the same frontend (HTML/JS) rendered with your browser instead of Electron/Chrome
- gabereiser 3y agoThe only reason you have a vscode desktop app is because vscode is just plain old javascript and will work with whatever html runtime. Chromium or webkit. It has nothing to do with electron.
- MikusR 3y agoVSCode is based on Monaco https://github.com/microsoft/monaco-editor https://github.com/microsoft/monaco-editor.
- al_be_back 3y agoFor now it's best as an IDE for repo (github, azure) code. But I guess it won't be long before they (microsoft) make virtual envs available on Azure, so you can Run and Debug. That would kick a storm in the Dev world.
- blackoil 3y agoIsn't Github Codespaces exactly what you are asking for?
- al_be_back 3y agoThat could be "one" env provider/integrator. You'd have: - Repo Providers [Guthub, Azure, GitLab etc] - Environment Providers [Azure, AWS, Google Cloud, GitHub Codespace etc] - Code Generation providers [openai etc] - Other providers ...
- BiteCode_dev 3y agoCool tool in a pinch. Use it when it makes sense, but make sure you never, ever, depend on it. They will do everything in their power so you do. They will make it very attractive. Very convenient. At some point it will require active efforts not to. People might pressure you to do so, like when everybody asked you to create a FB account. But unlike facebook users, you have the technical know-how, so if you put your entire dev stack in the proprietary cloud, with microsoft services on top of that, nobody will cry for you when you ineluctably get bitten by it a few years from now. Big companies are not your friends. They will abuse it. You will get locked in.
- VyseofArcadia 3y ago> Use it when it makes sense, but make sure you never, ever, depend on it. > They will do everything in their power so you do. It seems utterly insane to me that we put up with this. VSCode is a pretty simple tool. A recent iteration of a tool that we've had since the 60s. But they do their damndest to hook you and then keep you hooked. It's like if a tool company put out a hammer with a comfortable handle and everyone bought one. Then to make sure sales stayed high, they started selling them with the handles secretly coated in cocaine to keep people buying.
- makeitdouble 3y agoTo parent's point, depending on your org "VSCode" is less the editor part, and more the server component coupled with specific extensions, and probably container definitions for some esotheric projects. We have a setup guide for beginners, and the VSCode route can be set in 15 min , where going for any other editor would probably require half a day. Switching to something else could of course be done with enough effort, but it would take some crazy level sabotage from Microsoft to go these lengths.
- VyseofArcadia 3y ago> but it would take some crazy level sabotage from Microsoft to go these lengths. That isn't unprecedented, but I think they are trying to go more of the boil the frog route these days.
- santiagobasulto 3y agoWhere's the source (or the subset of the source) available? Supposedly, vscode.dev is "a lightweight version of VS Code running fully in the browser", so probably a fork? I'd like to deploy this same webapp but behind our VPN.
- flohofwoe 3y agoNot entirely sure, but Gitlab's "web ide" fork: https://gitlab.com/gitlab-org/gitlab-web-ide-vscode-fork ...points back to: https://github.com/microsoft/vscode ...so I guess all the needed bits and pieces needed for a pure web version should be in the original Microsoft repository.
- pjmlp 3y agoVSCode actually started as a Web IDE for Azure development, they then pivoted into an Electron shell as when they noticed Atom adoption. Its main architect is one of the guys behind IBM Visual Age products and Eclipse, Erich Gamma.
- rahoulb 3y agoThere's code-server (https://github.com/coder/code-server https://github.com/coder/code-server) which you can install on your own machine and is based off VSCode. However, it doesn't have access to some of the Microsoft VSCode extensions (although there are generally equivalents).
- WorldMaker 3y agoIt's not a fork, it is the same codebase. VS Code on the desktop is an Electron app, and this is (basically) running the app as a PWA without the Electron host process or certain native extensions. As far as I'm aware there's no official guide for self-hosting it on your own server/bring-your-own-server. But allegedly it isn't difficult and there are GitHub Issues you can search for posted by others that have or are in the process of doing it. https://github.com/microsoft/vscode https://github.com/microsoft/vscode
- zoomzoom 3y agoIf you want a similar in-cloud VSCode experience, but tied more tightly to your SDLC (e.g. CI/CD, branch previews, deployments) for each project and requiring less configuration to get a dev server running alongside it (this just lets you edit code, not run it) we offer “Workspaces” at withcoherence.com.
- mcemilg 3y agoI was using vscode tunnel to work on HPC resources. In the beginning it was like a magic, as time passed it turned into a headache. - I remember suddenly, we couldn't be able to connect because of a bug in a new release. Tunnel extension was updating itself automatically. I lost a working day to solve it, before realizing the issue. - Interestingly its getting slower after working some hours, works ok after reset. - Working on projects with 100+ files was slow, even opening a folder was very laggy. - I use jupyter notebooks daily but heavy, its turning out to impossible to work with heavy notebooks. Maybe most of the issues are fixed now, I don't know the current situation. If the problems will be solved, it's definitely a tool that I will use for my all dev stack.
- suralind 3y agoCan anybody share resources how to setup a state of the art devcontainers locally? I've done it once per repository, but couldn't find a way to have "user" owned extensions/themes/settings automatically installed when the container starts (I'm talking about bits that each dev may want to customize).
- isuleman 3y agoNo terminal :(