i'm using flutter on Debian/WSL2 on windows 11 (last updated on 22/01/2022) with vscode.
I want to debug a Flutter Web app from WSL2 and the Debug on chrome Windows (i've saw we can launch chrome windows version from Linux via WSL2).
What i did :
I've configured some options to use chrome.exe (windows version) via user env variables on widows:
SET CHROME_EXECUTABLE=C:\Program Files\Google\Chrome\Application\chrome.exe
SET WSLENV=CHROME_EXECUTABLE/p
on wsl, i can verify the conf is ok :
echo $CHROME_EXECUTABLE
/mnt/c/Program Files/Google/Chrome/Application/chrome.exe
Flutter doctor (i'm using fvm) seems OK :
fvm flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on Debian GNU/Linux 11 (bullseye) 5.10.60.1-microsoft-standard-WSL2, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (2 available)
I've noticed that when i run flutter doctor, chrome.exe is launched... i don't understand why ...?
But the main problem is when i run my flutter web in debug mode frome vscode, chrome.exe is launched immediately without url.
Then when vscode has finished and is waiting chrome to debug, chrome.exe is opened 4 times on the url like "http://localhost:44707/" but i see nothing in the browser, even if i click "dart debug extension". And I have multiple error "can't reand and write on /tmp/flutter.tools.YRLOKA/flutter_tools_device.XXXXX""
How can i debug on chrome.exe from WSL2 ?
thanks,
EDIT : i've tested chrome installation on my WSL2, but the performances are bad...chrome has no gui acceleration with default installation. And do installation of chrome twice is not a good idea. I don't want to install/work on Flutter on windows platform because I build all my apps on linux ans Macos.