gitpod icon indicating copy to clipboard operation
gitpod copied to clipboard

Feedback Issue: VS Code Desktop Support πŸ’¬

Open gtsiolis opened this issue 4 years ago β€’ 27 comments

Objective

The aim of this issue is to gather feedback on the VS Code Desktop Support feature to be released in September 2021. Any feedback is welcome! See relevant docs. πŸ”–

Background

The upcoming VS Code Desktop Support feature aims to enable software developers to use familiar local tools like VS Code to work with Gitpod workspaces via SSH instead of switching to Web IDE running in browser.

See relevant roadmap items[1][2]. πŸ—ΊοΈ

See also component: local companion app label and relevant project in the issue tracker. 🍁

Cc @akosyakov @svenefftinge @csweichel @JohannesLandgraf

Feedback

Any feedback is welcome but we're primarily looking for the following types of feedback:

  1. How could this new feature be improved? πŸ’‘
  2. What didn’t work as you expected it to? πŸ’­
  3. What do you like best about this new feature? 🧑

Feel free to send in any comments, thoughts, emojis, screenshots, or screencasts as well as open any new separate issues with a concrete problem statement for further discussion. πŸ’¬

gtsiolis avatar Sep 15 '21 15:09 gtsiolis

Feedback:

  1. Isn't it better to open workspace in the dashboard so we don't need to wait till the gitpod workspaces is loaded in browser. So, we just need to wait in VSCode Desktop
  2. Inside of VSCode, will you allow to manage the workspace inside VSCode Desktop? for example I have workspaces pinned in the Gitpod Dashboard and I only need to open my VSCode. I see the pinned workspaces, and click it, it will load the workspaces

What do you like best about this new feature? For the people who live pretty far from the Gitpod Server (SEA region). It makes the experiences better So the delay I do in terminal is still acceptable

cloudsbird avatar Sep 16 '21 06:09 cloudsbird

Isn't it better to open workspace in the dashboard so we don't need to wait till the gitpod workspaces is loaded in browser. So, we just need to wait in VSCode Desktop

Please follow https://github.com/gitpod-io/gitpod/issues/5641. We are targeting mid October to bring it.

Inside of VSCode, will you allow to manage the workspace inside VSCode Desktop? for example I have workspaces pinned in the Gitpod Dashboard and I only need to open my VSCode. I see the pinned workspaces, and click it, it will load the workspaces

Could you file an issue? It makes sense but we decided against it because of time constraints for now.

For the people who live pretty far from the Gitpod Server (SEA region). It makes the experiences better So the delay I do in terminal is still acceptable

Actually it is the same. It is just in the web version we disable the local echo by default, because it breaks docker run: https://github.com/microsoft/vscode/issues/110232 You can still enable it: https://code.visualstudio.com/updates/v1_51#_local-echo But be aware that even in VS Code Desktop you may be need to disable local echo if you want to use docker.

akosyakov avatar Sep 16 '21 06:09 akosyakov

I'm waiting for the aarch64 build of local-companion-app binary for being able to use it on my ARM device. Or would it be possible to use if I mange to compile https://github.com/gitpod-io/gitpod/tree/main/components/local-app for my CPU architecture?

I also created an issue. Thanks, waiting for it eagerly.

axonasif avatar Sep 23 '21 03:09 axonasif

Update: So I was able to cross-compile local-companion-app component for aarch64(arm) directly from Gitpod itself and it works! 2021-09-23-103539_1598x720_scrot

Although I'm a bit confused after reading this page of Gitpod documentation. Is local-companion-app and Open in VS Code the same thing?

I also installed Gitpod Remote Support extension in my local VSCODE but whenever I click on Open in VS Code from Gitpod, it ends up like below (right-side VSCODE window): 2021-09-23-102456_1598x720_scrot Note: On left I'm using Remote - SSH extension to connect via SSH with /tmp/gitpod_ssh_config(local-companion-app) which works but timeouts if I don't keep the browser window open for long. And the right VSCODE window was spawned by Open in VS Code button but something seems wrong.

axonasif avatar Sep 23 '21 04:09 axonasif

Is local-companion-app and Open in VS Code the same thing?

Open in VS Code brings own version of the local companion, it does not use own which is configured by a user. You don't need manually install the local companion when you are using VS Code Desktop, but it can still be used standalone for other use cases like for VIM users.

So I was able to cross-compile local-companion-app component for aarch64(arm) directly from Gitpod itself and it works!

Please file an issue to support such architecture as well that VS Code Desktop downloads the proper version!

For now there is a setting gitpod.installationPath which you can point to your version of the local companion. Drawback that you need to maintain it yourself. VS Code Desktop auto updates the local companion otherwise.

akosyakov avatar Sep 23 '21 06:09 akosyakov

Open in VS Code brings own version of the local companion, it does not use own which is configured by a user. You don't need manually install the local companion when you are using VS Code Desktop, but it can still be used standalone for other use cases like for VIM users.

Hi @akosyakov, thanks for clarifying it.

Please file an issue to support such architecture as well that VS Code Desktop downloads the proper version!

I just bumped a pre-existing issue https://github.com/gitpod-io/gitpod/issues/5320#issuecomment-925557804

For now there is a setting gitpod.installationPath which you can point to your version of the local companion.

I am unable to find this settings on my VSCODE. Also another odd thing is that there are two identical extensions available in the marketplace, which feels confusing.

2021-09-23-131536_1598x720_scrot

axonasif avatar Sep 23 '21 07:09 axonasif

I am unable to find this settings on my VSCODE. Also another odd thing is that there are two identical extensions available in the marketplace, which feels confusing.

This setting is not public, open user settings json file and add it.

One extension is running in your local VS Code to open SSH window, another is running in Gitpod workpsace to integrate with Gitpod tasks and so on. Do you think we can do something to clarify it? You actually does not need to install them, VS Code will do it for you at proper timing.

akosyakov avatar Sep 23 '21 07:09 akosyakov

This setting is not public, open user settings json file and add it.

Got it.

One extension is running in your local VS Code to open SSH window, another is running in Gitpod workpsace to integrate with Gitpod tasks and so on. Do you think we can do something to clarify it? You actually does not need to install them, VS Code will do it for you at proper timing.

Oh, these weren't automatically installed. I'm not sure, could be a issue on my side.

axonasif avatar Sep 23 '21 07:09 axonasif

Oh, these weren't automatically installed. I'm not sure, could be a issue on my side.

Did you do Open in VS Code from web version? VS Code Desktop should ask you then do you want to install Gitpod extension? Gitpod Remote is only installed then you actually connect to some workspace, in the remote server, you don't need it locally.

akosyakov avatar Sep 23 '21 07:09 akosyakov

Did you do Open in VS Code from web version?

I did. I use Gitpod from Firefox. A new empty file opens up with some encoded gitpod.io url in the file-name after clicking on Open in VS Code from Gitpod WEB IDE.

Please take a look at the VSCODE window on right-side of this screenshot. For the left window I had to manually run local-companion-app and then connect via Remote - SSH extension in VSCODE.

2021-09-23-102456_1598x720_scrot.png

axonasif avatar Sep 23 '21 07:09 axonasif

I did. I use Gitpod from Firefox. A new empty file opens up with some encoded gitpod.io url in the file-name after clicking on Open in VS Code from Gitpod WEB IDE.

It looks wrong, maybe vscode URI system handler does not work on such linux :(

akosyakov avatar Sep 23 '21 09:09 akosyakov

Okay so I finally made the Open in VS Code button to work on my ARM device. --open-url parameter was missing in my vscode installation $HOME/.local/share/applications/code-url-handler.desktopfile. I also had to specify a custom path for local-app since this is an ARM device. Thanks to @akosyakov for providing me a tip above!

~~One thing I should mention is that I had to use Open in VS Code button twice for the first time(When Gitpod-Desktop extension is not installed locally in VS Code Desktop) to actually let the Gitpod extension establish a connection to my target workspace.~~ (Seems to be okay now)

Feedback

I think it would be awesome if the Gitpod-Desktop extension had an actual GUI front-end for managing everything gitpod directly from VSCODE. So that we don't have to rely on an external browser. I see that @cloudsbird already suggested something similar and this is pretty much the same idea.

axonasif avatar Sep 23 '21 09:09 axonasif

I keep getting some errors like:

time="2021-10-28T00:28:07+09:00" level=info msg="writing workspace ssh_config file" ssh_config=/var/folders/q1/qh2qmc0s7k10mvj49jsm71gh0000gn/T/gitpod_ssh_config-15681-4wW527WK1xkR
time="2021-10-28T00:28:08+09:00" level=error msg="cannot get workspace" WorkspaceID=red-fly-1dhz30zn error="jsonrpc2: code 403 message: operation not permitted: missing get permission on workspace"

OS: Mac Arch: Intel

If I recall correctly I used the VS code Desktop Support successfully a few weeks ago. I suspect I'm using a different account than before but somehow/somewhere the extension is still linked to the other account and I can't figure out how to log out of it.


Edit: Just reread the top message, let me try to reframe in context of 2. What didn’t work as you expected it to? πŸ’­:

I could be wrong about the error, but if my guess is correct, I have two expectations here:

  1. Should be able to reset the plugin state easily. Here are some things I tried to do that didn't work:
  • reinstalling VS Code
  • reinstalling the extension
  • delete the Gitpod Local Companion and its state (failed, can't figure out where it is saved)
  • delete some key marked "gitpod" in my Mac Keychain
    • after this I was able to trigger an "authorize gitpod" flow through the command line but still got the "cannot get workspace" error in VS Code
  1. Should accommodate developers with multiple accounts (For example, someone working at home you might want to switch between a personal and company account)

patdx avatar Oct 27 '21 15:10 patdx

You already know this but.

I'd like to be able to access local resources connected to my usb ports and or enable my workspace to connect to services I have running locally and listening on localhost. Without having to run any ssh commands myself.

0Grit avatar Oct 29 '21 04:10 0Grit

@patdx It sounds strange, you are running latest gitpod-desktop extension in VS Code? It sounds like your token is invalid then the local app should detect it and invalidate automatically. Not sure why it does not happen for you. Could you share local app logs with me by sending to [email protected].

Should be able to reset the plugin state easily. Here are some things I tried to do that didn't work:

Try to clean mac keychain from anything for gitpod.io host and kill all processes with gitpod in name.

Should accommodate developers with multiple accounts (For example, someone working at home you might want to switch between a personal and company account)

It sounds like a valid feature request, right now we support only one token per gitpod host. Could you file an issue please?

akosyakov avatar Oct 29 '21 08:10 akosyakov

I'd like to be able to access local resources connected to my usb ports and or enable my workspace to connect to services I have running locally and listening on localhost. Without having to run any ssh commands myself.

@0Grit For serial sport it is tricky. Since it is L1 and tunnelling happens on L2. You will need to use some tools like socat to tunnel usb over tcp yourself: https://unix.stackexchange.com/a/201763

Generally we would like to support remote-port forwarding for the local app, but also new transport modes like via wireguard, so then you can build a network of your machines including workspaces. You can do it already now with the experimental network mode and tailscale: https://www.gitpod.io/blog/tailscale

akosyakov avatar Oct 29 '21 08:10 akosyakov

@patdx It sounds strange, you are running latest gitpod-desktop extension in VS Code? It sounds like your token is invalid then the local app should detect it and invalidate automatically. Not sure why it does not happen for you. Could you share local app logs with me by sending to [email protected].

Should be able to reset the plugin state easily. Here are some things I tried to do that didn't work:

Try to clean mac keychain from anything for gitpod.io host and kill all processes with gitpod in name.

Hi @akosyakov, thank you very much for the advice. I tried again and amazingly it worked this time. Here was my process:

  1. Restarted my computer
  2. Tried to clean my Mac Keychain of gitpod.io but did not find any references this time
  3. Tried to kill any processes with gitpod in the name but didn't find any
  4. Triggered "Open in VS Code" feature
  5. Gitpod extension was installed in VS Code v0.0.27 (I left it uninstalled previously)
  6. Gitpod extension opened a browser window and seems to do some authorization process.

So I don't think I have any logs to share. If there's any diagnostics/logs I could still send to help please let me know.

Should accommodate developers with multiple accounts (For example, someone working at home you might want to switch between a personal and company account)

It sounds like a valid feature request, right now we support only one token per gitpod host. Could you file an issue please?

Thanks. It looks like somebody just filed a request for this here: https://github.com/gitpod-io/gitpod/issues/6452

patdx avatar Oct 29 '21 16:10 patdx

I have temporarily unpinned to put up the JetBrains issue, we'll get this issue back pinned following the JetBrains beta.

loujaybee avatar Nov 05 '21 10:11 loujaybee

please help, I got the "Open in VS Code" stuck on VS Code desktop side.

[11/8/2021, 11:19:03 PM] fetching the local app from https://gitpod.io/static/bin/gitpod-local-companion-darwin
[11/8/2021, 11:19:03 PM] starting the local app with the config: {
  "gitpodHost": "https://gitpod.io",
  "configFile": "file:///var/folders/__/k19xrs456tgdsyjp_4w35tcc0000gn/T/gitpod_ssh_config-7750-xDAoFHD0ziUu",
  "apiPort": 61686
}
[11/8/2021, 11:19:03 PM] the local app has been stared: {
  "pid": 10505,
  "log": "file:///var/folders/__/k19xrs456tgdsyjp_4w35tcc0000gn/T/gitpod-local-companion-7745-JXFKLIpiSsxx.log"
}
[11/8/2021, 11:19:03 PM] released lock: gitpod.io
[11/8/2021, 11:19:04 PM] the local app (pid: 10505) is running, but the api endpoint is not ready: Error: Response closed without headers
[11/8/2021, 11:19:04 PM] retying again after 1s delay...
[11/8/2021, 11:19:05 PM] the local app (pid: 10505) is running, but the api endpoint is not ready: Error: Response closed without headers

...this repeats until timeout

but I got this working previously, the only thing which changed I think is the GitPod custom image - https://github.com/vlad-labs/gitpod-cloud-engineer-helper

vavdoshka avatar Nov 08 '21 22:11 vavdoshka

@vavdoshka Could you try to close VS Code and kill all processes with gitpod in name and they try again? If it does not help please collect logs and send them to [email protected]. Thank you.

akosyakov avatar Nov 09 '21 08:11 akosyakov

@akosyakov I've wiped out VS Code and installed the latest Version: 1.62.1 (Universal), also killed the companion process and removed gitpod.io key from keychain. Then tried "Open in VS Code" it prompted to install extension and authenticated to Gitpod after and still same issue. Also I tired with standard full-worksapce image, same issue.

I have gathered the logs and did send them to [email protected] . What I found is that the configFile (ssh_config) is created empty, don't know if that lead to something.

vavdoshka avatar Nov 09 '21 19:11 vavdoshka

Loving the desktop support btw, the ability to use keyboard shortcuts to flick between browser and ide has saved my sanity, no more hunting through multiple tabs in multiple browser windows for me!

@vavdoshka I used to have this happen quite regularly, though it hasn't happened in a while. But to fix it I would open the ssh config, find the file in Finder, delete it and the other gitpod files in the folder, find the gitpod-companion app in Activity Monitor and kill it (not sure if this was required, but it wouldn't hurt). Then try to "open in VS Code" from the browser, and that would usually work.

image

image

image

image

T 2021-11-10 10-29-21

T 2021-11-10 10-30-42

digiltd avatar Nov 10 '21 10:11 digiltd

@digiltd

thank you for you help, unfortunately this did not work out for me, the "ssh_config" files created are just being empty on my side, nothing changes..

When I did a first pass on GitPod evaluation this Desktop Support worked well for me and I even used to it already and it is really hard to switch to browser due to that reason you mentioned already about dancing with the tabs, as well as I found that not all required extensions are supported in browser version, plus some console applications (like k9s) just feels really slow in browser.

@akosyakov please advice what could be the options to fix this

vavdoshka avatar Nov 13 '21 12:11 vavdoshka

oh I think I have some improvement after I allowed VSCode to "run software lcoally that does not meet system's security polciy"

image

to have "Developer tools" in Security & Privacy -> Privacy

sudo spctl developer-mode enable-terminal

the change helped after reboot

vavdoshka avatar Feb 23 '22 19:02 vavdoshka

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 25 '22 23:05 stale[bot]

~~It would be nice if it was possible to open a new workspace in desktop VS Code without opening the web VS Code. I also get an error when I open a workspace in desktop VS Code too soon, I get a connection error (I think to ssh) and I have to click Retry.~~

Nevermind, I changed the default editor in my preferences to VS Code (desktop) and changed gitpod.remote.useLocalApp in VS Code settings to false, I don't get a connection error anymore.

mlvzk avatar Jun 23 '22 09:06 mlvzk

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 22 '24 15:05 github-actions[bot]