vscode: Cannot test Web Extensions in WSL2 or Dev Containers

Type: Bug

Following instructions from here to start web extension in desktop VSCode from WSL2:

The extension is built fine but it’s not shown when running Developer: Show Running Extension in [Extension Development Host] window and trying to run Hello World command fails saying that it is not found (even though command is visible in command palette).

Trying both VS Code desktop and @vscode/test-web options yields the same results.

Running non-web hello-world extension sample is working as expected though.

I also cannot find any relevant logs.

VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z) OS version: Windows_NT x64 10.0.22621 Modes: Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2 Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2

System Info
Item Value
CPUs 11th Gen Intel® Core™ i5-11300H @ 3.10GHz (8 x 3110)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.70GB (2.77GB free)
Process Argv –crash-reporter-id bacc653e-b8c0-4166-83a7-51ae995f7274
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-22.04
OS Linux x64 5.15.133.1-microsoft-standard-WSL2
CPUs 11th Gen Intel® Core™ i5-11300H @ 3.10GHz (8 x 3110)
Memory (System) 7.61GB (4.85GB free)
VM 0%
Item Value
Remote WSL: Ubuntu-22.04
OS Linux x64 5.15.133.1-microsoft-standard-WSL2
CPUs 11th Gen Intel® Core™ i5-11300H @ 3.10GHz (8 x 3110)
Memory (System) 7.61GB (4.85GB free)
VM 0%
Extensions (18)
Extension Author (truncated) Version
tsl-problem-matcher amo 0.6.2
codespaces Git 1.16.5
remotehub Git 0.62.0
gitpod-desktop git 0.0.163
opa-highlight-only gle 0.1.1
vscode-drawio hed 1.6.6
remote-containers ms- 0.327.0
remote-ssh ms- 0.107.1
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.81.8
remote-explorer ms- 0.4.1
remote-repositories ms- 0.40.0
lo und 0.0.70
vscode-eslint dba 2.4.2
prettier-vscode esb 10.1.0
vscode-docker ms- 1.28.0
svelte-vscode sve 108.1.0
vscode-zig zig 0.5.1

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30899288
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
3biah626:30602489
89544117:30613380
showlangstatbar:30737416
962ge761:30917236
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialog:30910333
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019:30917259
cp7184t:30925682

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Just spent an hour on this struggling to understand why the hello world extension wasn’t working before finally finding this bug. It’s definitely a rough experience, especially for someone who has zero experience with extension development and doesn’t yet have the knowledge to be able to effectively debug what’s going on.

If WSL isn’t supported for development like this, can I suggest that VSCode should emit an error if attempt to install a web extension? I think a clear error message would go a long way towards helping users mitigate this problem.

I tested that running the hello world web extension works.

  • npm i -g yo generator-code
  • yo code, New Web Extension
  • open in code insiders, Run Web Extension from the debug viewlet
  • Run the command Hello World