I'm trying to run a flutter app with VScode inside of WSL (win11)
Here's how I setup my vscode and WSL
- Installed dart and flutter plugins for VSCode (installed inside WSL)
- Installed dart and flutter SDK inside of wsl using terminal
- Added the flutter bin folder to PATH
The error happens when pressing the run/debug button built into the IDE.
Here is the full error;
Downloading linux-x64/linux-x64-flutter-gtk tools...
Downloading linux-x64-profile/linux-x64-flutter-gtk tools...
Downloading linux-x64-release/linux-x64-flutter-gtk tools...
Launching lib/main.dart on Linux in debug mode...
lib/main.dart:1
(flutter_application_1:373): Gtk-WARNING **: 23:32:28.406: cannot open display:
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
Error launching application on Linux.
Exited (sigterm)
Is there any suggested fix for the following?