-
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
Running an app in VSCode in debug mode with an assert statement: could not load source #35392
Comments
The VM no longer providers source code for some internal libraries. I'm guessing this is one (@devoncarew?). VS Code is supposed to walk up the stack to the first frame that has source code (so you'd be looking at the call to |
flutter/flutter#24912 is about a similar error. |
Although the error is the same, I think the question there is more about the failure that resulted in it breaking, than the fact it's not showing the source - I've added some notes on how to figure out what's wrong (and encouraging people to 👍 the VS Code issue, since it doesn't seem to be considered high priority). |
We're going to look at restoring source code for dart: source, but this might not happen for a few releases. |
I think that's both good and bad :-) If we do nothing, and VS Code fix their bug, the user would end up looking at their call to I wonder if VS Code would consider some flag that lets us control which frames should be auto-focused without it being the same "has source" (or let us control which frame to focus on explicitly when an exception occurs). That way we could put the user in a good place while still giving them the source to dig into. Slightly related is: #29156 though I don't know if that's fixable without hiding the top stack frames (which probably isn't the best solution). |
@devoncarew – would you triage? Is this an SDK issue? VM? analyzer? |
FWIW, this behaviour/change shouldn't impact VS Code negatively now. VS Code have fixed a bug and added a new feature that will let us focus the correct code when an exception occurs (even if it's not top of the stack). So, I think restoring the sources would be a good change (especially as it's really confusing that you can Go-to-definition into them via the analyzer today, then when you Step Into with the debugger we say they're missing). |
@devoncarew - triaging as analyzer for now. Please feel free to move. :-) |
I think this is a combination of two issues:
In which case, probably we don't need this additional issue. |
I think this is safe to close given the upcoming VS Code fix. We can track work to restore dart: sources in #34832 (I do think it's important to get that restored - I've hit the issue in different contexts several times since the dart: change). |
This issues still pertaining even in dec 2020. |
@GanongLS I don't seem to be able to reproduce this using the code above. Could you file an issue at https://github.com/Dart-Code/Dart-Code with an exact code example and the exact SDK version you're using? Thanks! |
I installed the dart-sdk via chocolatey. The latest version (2.1.0) is installed. The error does not happen when I run the app via command-line with the --enable-asserts flag.
Why can't VSCode find this file?
The text was updated successfully, but these errors were encountered: