Are files saved locally on the PC of anyone who may be collaborating with the project owner.
If yes where are they saved?
If its an option how can I enable it?
If its not a feature will it be added soon?
else{ idk }
For guests using Visual Studio Code, the file is not saved to the guests file system.
For guests Visual Studio 2017, the file contents at the time of opening is placed in a temporary location. All changes are kept in memory after that. When the guests leaves the session, the temporary folder & it's contents is removed.
What is the scenario you're looking at where you want the local file saved?
Hi, sorry for the late response. I use Visual Studio Code, and I'm using Live share to develop a discord bot using REST API and a website connected to it. Since we (the collaborators) live in practically the same timezones, liveshare makes more sense for us and prefer to use it. But instead of sending Zip files once a session has been completed, it'd be nice for the files to autosave locally.
Do you use any Version Control System to facilitate collaboration on this project? Do you see any disadvantages to having one of the collaborators (the host) commit the changes from a Live Share session after it's ended?
Im new to the git ecosystem, so I dont use any Version Control. (its pretty much the only version control system that I know of). I didn't understand the second part of the question, but as far as the disadvantages go, LiveShare can be extremely laggy at times
@Enscivwy Hey! Would it be sufficient for the guest (the person who joined the session) to be able to run a command (e.g. “Live Share: Save Workspace”), which saved the entire project locally? That is something we’ve been planning to do, and we could use this issue to track that request (assuming it would meet your needs).
Additionally, I’d love to hear more about the lag you’ve experienced with Live Share. When have you noticed performance issues? When joining? Editing? Debugging? Etc. We’re actively working on performance improvements, and so it would be useful to hear feedback about what could be improved. Thanks!
Yes, for my needs, it would be sufficient! Although I've seen some extensions such as Floobits, which auto-update the locally saved files on the collaborators system. If a collaborator also happens to missed some of the work, and the host decides to do it by his own, it also updates the files on each join. But I assume that would require the files to be saved on a server somewhere and would be pretty insecure for obvious reasons.
I've been designing a website for a while now, with a friend living in Indonesia, He has a Mac, and I have Windows 10. Although VSCode doesn't consume too much memory, he also complains that it uses a lot of RAM while he joins a session hosted by me, along with lagging some times. (We are editing files usually, mostly the same files). I decided to then join a session hosted by him. I didn't see too much RAM being used, but I did notice it lagging some times. We would often talk by writing comments in the code itself, and there would be times when I could notice that some words or sometimes even entire sentences start to appear with delays. During these delays, VS also starts to lag, so whatever I'm typing, that too starts to appear on my on PC with a delay (within VS only)
I hope the language is understandable
@Enscivwy Yeah, Floobits takes a slightly different approach than we do with regards to how files are synchronized. With Live Share, when you share your workspace, you aren't uploading any of your code to a centralized server. You're simply enabling the future possibility for someone to join you (who has the session URL), and request access to the resources that you choose to share (e.g. files, terminals, locally-running web servers). Furthermore, only the files that guests actually open are downloaded, which enables them to join your collaboration session as quickly as possible (as opposed to needing to wait to download the entire project).
In general, we've found this approach to work well, both for performance purposes, but also security (many users don't want their code on someone else's servers). Having a Live Share: Save Workspace command is something we intend to do, so if that sounds sufficient to you, then we'll use this issue to track it. Thanks!
Yes, it does sound pretty sufficient!
Also, this may sound pretty obvious and dumb, but
re-running the command after a session will update the files?
@Enscivwy Initially, I was just thinking that this command would create a zip file, that you could save/unzip anywhere on your local filesystem. Would that work?
I believe so, but then doing so wouldn't mean fire overwrites after edited a while, i.e you'll have to unzip the file everytime you also want to update the code saved locally
As a user of vscode live-share, I think this is a pretty important feature that personally would increase the work efficiency of my team a lot.
@JesuisAhmedN Would the proposal I mentioned above be sufficient for your use case? That is, a simple “Live Share: Save Workspace” command that created a zip of the project.
Also, could you share a little bit of detail about your use case? It would be useful to understand more about how your team collaborates, to make sure we take that into account for any designs for this request. Thanks so much!
@Enscivwy We don’t currently have this scheduled right now, so let me chat with some folks on the team and get back with you 👍
@lostintangent Yes, that solution sounds like a sufficient enough solution for our use case.
Here is our use case:
My team is working on a website together. Most times we work separately on features at different times so a version control system works well for us. However, sometimes we need to work together at the same time, but we live in different places and are unable to meet so the way we work is we skype each other, and we use live-share to code together. Then, the host (of the live-share) shares his screen on skype and we work on different features of the website. But let's say that I work on a page and I add some styling, I have no idea how that's going to look since I can't actually open the html file because I don't have the html file locally. So I have to ask the host, who's working on another page to go to his browser and refresh on my page to see how the changes are reflected. You can imagine how this can get out of hand as the host would end up eventually becoming a refresh bot for us (the contributors), and he would be unable to get his own work done.
A solution like the one described above would help because if I needed to see my own design, I could just download the work we've done so far and just see the changes I've done myself instead of asking someone else.
An ideal solution would be to find a way to, first, download the workspace folder from live-share, and then have a 'sync' button, so everytime someone adds more code, instead of having to re-download, I can just sync, but I think this solution is more complex and I would rather have a sufficient solution soon than a complex solution later.
@JesuisAhmedN It sounds like our shared servers feature may actually be what you’re looking for? That would enable the host to run the app, and then share it remotely with each guest, without them needing to run it locally.
Out of curiosity: how is the host running the app? Via a command like operation? Using a VS Code extension (e.g. Live Server)? Something else? I’m asking because we want to explore how to make shared servers more discoverable, and so it would be useful to know your team’s current workflow.
Sorry for the late reply, and thanks! That's exactly what our team needed
I've been in a discussion amongst peers where a feature like this could help. Where we all have the workspace on our own systems. Even via a git clone etc.
We would work in collaboration, but since the files are stored on our own devices, we can debug/compile alone without being the host if it's required at the time.
Any git commits made from this could also include a co-author remark.
The feature regarding guests being able to initiate a debugging session did help this in the meantime
Feedback from @ThePhysicsGamer from 1519:
I'm working on a project with my friends and I wanted to know if it was possible to create a copy of the owner's document when we work together with Vs Live Share, a bit like Saros does it in Eclipse (if you know the program).
Yea, each user have its own copy of the host's file. I want to use Vs Code to program a robot for the FIRST robotics competition. So I'm currently using Eclipse but this year we need to migrate to Vs Code and the alternative to Saros (basically Vs Live Share for Eclipse) is Vs Live Share. When I started sharing a file with Saros, the users made a copy of the file that the host was sharing and then everybody was writing in everyone's file. When the host ends the session, everybody is left with his copy. So that's how it works. I really liked this method, because even if the original host couldn't be present, everybody had a copy so they could continue programming.
+1 for adding this. This would be an absolutely killer feature for me. Even if the files were only temporarily stored on disk and disappeared after a session ended or if a manual "sync" button was required it would still improve efficiency significantly.
@PercussiveElbow Hey! Could you share a little bit about your use case? Are you looking to run a local tool on the codebase? I just ask since Live Share already allows the host to share build output, running web apps, etc. and so it would be useful to know if there are alternative solutions to what you’re looking to do. Thanks!
Primarily for the ability for each user to run the project. Normally we'd push to git when collaborating but for quick high pace hacky projects it would be useful to each be able to individually run/test the code without having to push to VC first. Apologies if this already exists in some form and I'm missing it. The terminal sharing does help but doesn't perfectly fit that use case.
@PercussiveElbow What kind of app are you working on? If it’s a web app/API, then the host could share it with everyone, that way you don’t need to run it individually. Check this doc for more details. I’d love to know if that suited your needs or not.
It's not always web/api based projects unfortunately. I wasn't aware of that feature so that should help us with that scenario for sure. 🙂
Our usecase was in a C++ console application. Since we were unable to compile/run it independently we saw no use to continue using liveshare for collaboration
@Scrxtchy Would shared terminals help here?
You could share a writeable terminal and let everyone build and run the console app as needed.
@lostintangent I think this would be great in VS Code if the guests were somehow able to compile and run on their current machine via a shared terminal from their side. I am developing via flutter and want to develop from my windows pc and see it locally on my android emulator/device, but also compile changes in real-time to see it on iOS device compiled by my mac.
In the beginning, I thought live share is like the sharing in Microsoft office, all users have local copies, and automatically sync, there is no a hoster, we don't need to work at same time. Something like overleaf. That's most useful.
I'd also like this feature. My usecase: I have a laptop at which I mainly code and a faster computer which got to run my Julia programs. Thus, while coding on my laptop I want the same code to run on the other computer. And all changes (even those while running) shall end at the other computer aswell.
We are Using Lifeshare to collab on communicating sequential processes (csp) files.
The interpreter needs the file locally.
Also very usefull for pair programming where the static on the fly code analysis tools need the file
I agree this would be very useful. I'm trying to make a chrome extension and others can't test the extension live with me, as they don't have the updated files.
Is this feature being developed, and/or are there plans to develop this feature? I develop Flutter apps and have recently begun pair programming using VSCode Live Share. I would like both the guest and the host to be able to run the app locally on their machines. Otherwise, we are limited to only having a single person debug the app.
I'm with @garrrettt here, for me the use case is giving workshops through live share, where participants should be able to run the Java code rather than only watching me do it. So a button or some kind of hook that saves all files temporarily on their local filesystem would be very welcome, since then the participant can execute the Java code on their end.
If you're only looking for participants to be able to run the code you've written, you can give your participants access to the terminal to enable them to do it. Though, I do understand this would still be incomplete as the code would actually be running on your machine regardless, and if it is an application that isn't server based, it will probably only run on your machine, and the other participants would still have to watch you. I understand what I said is probably not what you meant, however, I just wanted to say.
@Enscivwy especially as I understand him, this wouldn't work, since at each time only a single person can use it, not every participant.
I would also like to vouch for a feature like this to be implemented. I recently joined a Bootcamp that's using VS Code Live Share for pair programming during lab. However, as stated above, only one person gets to keep the local files afterwards. This leaves the other partner without the ability to save to their file system. This makes it difficult for when we self-study since one of us can't refer back to the lesson.
In some sense this is a clean request to also keep the files in sync rather than only the editor content.
In combination with git that might allow for a very intuitive solution where you can simply point your guest liveshare to the git directory and the guest vs code can then "align" the own file/dir tree to the remote one by aligning the corresponding .git directories. For the non-git variant one could offer a prediction of how many files match (to find the right entry point) and then keep the files in sync
Hey all! This is now resolved, thanks to an enhancement in VS Code. If you join a Live Share session, you can now right-click a file, folder or the entire workspace in the Explorer tab, and select Download... in order to save the selected files to your local machine. Thanks again for all the feedback, and please let us know if you run into any problems with this experience 👍
@lostintangent does this allow compiled code to run as well via compilation of a local copy? That was the root intention of the issue before. Downloading the file locally may be a precursory step, but if things still cannot compile with a local copy, this issue probably should stay open.
@MichaelReed Once the guest downloads the workspace locally, they could compile/run/debug it, just like if they had cloned from it a repo. The original issue asked for a simpler solution than sending around zips after a session was completed, and the new “Download...” command is meant to enable that.
In order to track feature requests, it’s a bit easier to have separate issues for seperate things, and so I’d prefer to close this issue, and track any additional requests in separate, more specific issues. For example, #3524 is tracking the request to have guests run code independently, which I think represents some of the use cases from others in this thread?
Perfect! I added a thumbs up there and request others on this thread with the remote run/compile use case in mind do the same.
So, if I understand it correctly, it's still not meant to keep the code on different computers in sync (for example by broadcasting the individual changes), right?
Most helpful comment
Is this feature being developed, and/or are there plans to develop this feature? I develop Flutter apps and have recently begun pair programming using VSCode Live Share. I would like both the guest and the host to be able to run the app locally on their machines. Otherwise, we are limited to only having a single person debug the app.