-
Notifications
You must be signed in to change notification settings - Fork 338
Description
Describe the bug
When using web-launch-url in VS Code on Windows, it fails to pass multiple parameters correctly to the Flutter web app. Despite identical configuration files, this only occurs on Windows, while Linux and macOS handle the parameters as expected.
Details
Using the following configuration from my launch.json file:
{
"name": "example(livekit)",
"cwd": "example",
"request": "launch",
"type": "dart",
"env": {
"DISPLAY": ":0"
},
"args": [
"--web-browser-flag=--disable-web-security",
"--web-port=9080",
"--web-launch-url=http://localhost:9080/?autoConnect&serverUrl=https%3A%2F%2Fmeet.livekit.io&room=123456&name=vscode",
"--dart-entrypoint-args=--autoConnect",
"--dart-entrypoint-args=--serverUrl=https://meet.livekit.io",
"--dart-entrypoint-args=--room=123456",
"--dart-entrypoint-args=--name=vscode",
]
}
https://github.com/AoEiuV020/livekit_meeting/blob/89b0919e4792cfbde3d7f8407733406d30eea1ff/.vscode/launch.json#L30
On Windows, the browser URL launched in the address bar is truncated to:
http://localhost:9080/?autoConnect
All parameters after & are lost, and when targeting Windows, this configuration also causes all subsequent dart-entrypoint-args to be ignored. However, if the web-launch-url is removed, the dart-entrypoint-args function normally.
Running flutter run directly from the command line with parameters works without issue:
flutter run -d chrome "--web-browser-flag=--disable-web-security" "--web-port=9080" "--web-launch-url=http://localhost:9080/?autoConnect&serverUrl=https%3A%2F%2Fmeet.livekit.io&room=123456&name=vscode"
To Reproduce
Steps to reproduce the behavior:
- In VS Code, select the Chrome device as the target.
- Go to the Run and Debug view.
- Select the example (livekit) configuration.
- Click on the Debug button to start the Flutter web app.
Expected behavior
The web-launch-url should consistently retain all query parameters across platforms when launching a Flutter web app from VS Code.
Please complete the following information:
- Operating System and version: win11
- VS Code version: 1.94.2
- Dart extension version: 3.98.1
- Dart/Flutter SDK version: 3.24.4
- Target device (if the issue relates to Flutter debugging): chrome 129.0.6668.101
