Closed techvx closed 1 month ago
The fix for https://github.com/Dart-Code/Dart-Code/issues/4932 was in the SDK so requires a new Dart/Flutter SDK to get it. The fix was made after the branch for the previous (Feb) release so will show up only in the next one.
If you're able to test on the beta
branch, you should find it fixed - but if you still see the error there, please let me know!
Just switched to the beta
, as confirmed by flutter doctor
:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 3.22.0-0.2.pre, on Microsoft Windows [Version 10.0.19045.4291], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.21)
[✓] Android Studio (version 4.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
No luck, nevertheless:
Launching lib\main.dart on Windows in debug mode...
✓ Built build\windows\x64\runner\Debug\app_6.exe
Connecting to VM Service at ws://127.0.0.1:61484/Hh4qesxiJFs=/ws
2 + 2
Unable to find the library for file:///e%3A/Development/_code/Flutter/app_6/lib/main.dart
Thanks for checking! Indeed, I can repro too - taking a look.
Ok, I think I know what happened here. We used to mostly use file paths in the debug adapter, which meant the URI sent for context here was converted to a file path. VS Code escapes the colon in the file URI, but converting to a file path with decode that.
As part of work to support macros, much of the debug adapter was upgraded to use URIs (to support virtual documents that aren't on the disk), and that meant we no longer convert the URI back to a file path, but use it as-is. This meant the encoded colon in the drive letter was sent to the VM and didn't match, so some mapping didn't work correctly.
We can handle this in the VS Code extension by disabling VS Code's over-escaping.
@techvx I've published a pre-release version of the extension that includes this fix (v3.87.20240423). If you get chance, would you be able to switch to it in VS Code and verify that with this version that it's working for you on Flutter beta
or master
?
You will have to click the "Reload" button after installing the new extension for it to become active.
Thanks!
It does work as intended now:
Thanks for the speed on this one.
Great, thanks for confirming (and bringing it to my attention!)
Quite similar to #4932, yet with a slightly less verbose of an output this time around.
Describe the bug Any attempt to execute an expression in VS Code's debug console for a Flutter app running in debug mode prints back:
To Reproduce Steps to reproduce the behavior:
2 + 2
in the VSC debug console.Expected behavior Having the debug console matching the output of the Flutter DevTools one.
Screenshots
Workspace Environment
```text Dart Code extension: 3.86.0 Flutter extension: 3.86.0 (activated) App: Visual Studio Code App Host: desktop Version: win 1.88.1 Workspace type: Flutter (LSP) Dart (3.3.3):Output from 'dart info'
`Output from 'flutter doctor'
`@DanTup