-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Run" button in vscode not working when using latest dart (dev) sdk. #52222
Comments
@DanTup coud you take a look? |
This might need to be moved to VSCode repo unless this is actually an SDK problem. |
@mmcdon20 I don't seem to be able to reproduce this (using Windows and the same dev SDK) with either release or pre-release versions of the Dart extension. Could you confirm:
Could you you also capture a log:
I'm not sure whether it's a Dart-Code issue or not. It's possible it could be a Debug Adapter issue (we're migrating to new debug adapters that live here in pkg:dds). With a log file it might be clearer where this issue belongs. Thanks! |
pubspec.yaml name: experiment
description: A sample command-line application.
version: 1.0.0
# repository: https://github.com/my_org/my_repo
environment:
sdk: ^3.1.0-56.0.dev
# Add regular dependencies here.
dependencies:
# path: ^1.8.0
dev_dependencies:
lints: ^2.0.0
test: ^1.21.0 Console tab Dart: Capture Debugging Logs
|
@mmcdon20 thanks - unfortunately not much helpful there. It seems like nothing happens after VS Code sends the request to launch. Can you confirm that when you're running
Also - I don't suppose you can easily switch back to the 2.19 SDK where this worked and capture the same log as above? It'd be interesting to know if the version where it worked was using the new SDK DAPs or whether you were on the legacy DAPs (this might help understand if it's a regression in the new DAPs, or there's something that has always failed in your environment here). |
It works fine from the command line.
Not a problem, just have to switch to flutter stable channel, and make the following change in pubspec.yaml. ...
environment:
sdk: ^2.19.6
...
Dart: Capture Debugging Logs
|
@mmcdon20 thanks! That log confirms you were running the new debug adapters when it worked, so this seems like a recent regression. It turns out I can reproduce this - I had mistakenly just grabbed the latest Dart SDK dev version from the dart website thinking that's what you'd used from the version, but you were on a newer SDK build rolled into Flutter's master channel. I'll see what I can find. In the meantime, I think the |
I have a fix open at https://dart-review.googlesource.com/c/sdk/+/300601. It was a recent regression (a subtle change that affected the order of debug adapter events/responses), and doesn't affect the Once the bot closes this issue it'll be fixed in the bleeding-edge Dart builds, but it may take a little longer to get to Flutter (it needs to roll into flutter/engine and then flutter/flutter). |
Dart SDK version: 3.1.0-56.0.dev (dev) (Fri Apr 28 13:05:51 2023 -0700) on "windows_x64"
I'm not sure if this is the right place to report an issue relating to vscode, but when you click on "Run" (where it says "Run | Debug" above main), vscode just stalls and the program never actually runs.
The button works correctly with a dart 2.19.x sdk, and also the "Debug" button works even in the latest dev SDK, and typing
dart bin/hello.dart
from the console works as well.The text was updated successfully, but these errors were encountered: