I am working in WSL2 on Windows 11 trying to run an index.js
file with Live Server. Whenever I open Live Server it seems that I can only do so when I use Microsoft Edge. This seems to add another layer of problems because the JavaScript does not seem to be working as I would expect. For example, if I click a button
element I don't see any animations to signify a "click".
I have checked that "liveServer.settings.CustomBrowser": "chrome"
is indeed reflectin Chrome in the VS Code settings, but when this is the case there are no windows that pop up at all. The only thing that I see trigger is a notification that tells me that the server is active on Port 5000, just no window popping up to demonstrate that. Ideally I would like to try and open Live Server with Chrome, but if this isn't possible in Windows 11 then is there a way to make JavaScript behave in Microsoft Edge?
I've the same configuration and the same issue. I've raised the issue #2445 in Github.
A workaround solution is to call directly your chrome program installed under windows to your liveserver setting.
sudo find /mnt/c/ -type f -iname chrome.exe 2>&1 | grep -v "Permission denied"
. For me this it's here:mnt/c/Program Files/Google/Chrome/Application.chrome.exe
.settings.json
file:{
"liveServer.settings.AdvanceCustomBrowserCmdLine": "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe --remote-debugging-port=9222",
}
Now chrome
should start when you run liverserver.
Hope this help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With