microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.74k stars 29.1k forks source link

File dialogs within a remote SSHed session of VSCode open on the host machine, not the WSL client #225975

Open jimmyjimjames opened 2 months ago

jimmyjimjames commented 2 months ago

Type: Bug

Open a WSL2 session on your Windows 10 computer.

PS C:\Users\my_username> wsl --version WSL version: 2.2.4.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.61 MSRDC version: 1.2.5326 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26091.1-240325-1447.ge-release Windows version: 10.0.19045.4651

Use ssh with the -X option to open a connection to a remote Ubuntu 22.04.4 LTS computer.

Within that ssh session to the remote Ubuntu computer, launch VSCode by typing "code".

VSCode properly launches over the forwarded X11 session, displaying the editor on my Windows computer. I can use VSCode properly and everything seems to work fine.

But, if I try to open one of the file dialogs, such as "File --> Open File..." the dialog window does not appear on my Windows client, but instead, the dialog window pops up on the host Ubuntu computer. It does this for all of the file actions, such as Open File, Open Folder, Open Workspace from File, Add Folder to Workspace, Save Workspace As.

Some of the other actions work properly, such as File --> New Window, which opens the new window on my Windows client, and Help --> About which properly displays the About dialog on my Windows client.

Other Linux applications like gedit do not have this problem, as the file dialogs from that application open on my Windows client as expected.

VS Code version: Code 1.92.2 (fee1edb8d6d72a0ddff41e5f71a671c23ed924b9, 2024-08-14T17:29:30.058Z) OS version: Linux x64 6.8.0-40-generic Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-9100HL CPU @ 1.60GHz (4 x 2600)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: disabled_off| |Load (avg)|1, 0, 0| |Memory (System)|15.48GB (13.27GB free)| |Process Argv|--crash-reporter-id e3d5322d-bd10-4598-9ddd-169cfa96e5bb| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|undefined| |XDG_CURRENT_DESKTOP|undefined| |XDG_SESSION_DESKTOP|undefined| |XDG_SESSION_TYPE|tty|
Extensions (8) Extension|Author (truncated)|Version ---|---|--- git-graph|mhu|1.30.0 vscode-docker|ms-|1.29.2 remote-containers|ms-|0.380.0 cmake-tools|ms-|1.18.44 cpptools|ms-|1.21.6 cpptools-extension-pack|ms-|1.3.0 makefile-tools|ms-|0.10.26 cmake|twx|0.0.17 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 vscaac:30438847 c4g48928:30535728 azure-dev_surveyonecf:30548226 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 g316j359:31013175 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl2:31104044 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-c:31111717 wkspc-ranged-c:31118571 ```
joshspicer commented 3 weeks ago

We have several remote development solutions available that we actively maintain, would something here suit your needs?