Breakpoints in Dart SDK code are not hit
See original GitHub issueI tried to put breakpoints in Dart SDK code but those breakpoints are ignored.
To reproduce this I setup an environment with :
- A fresh SDK installation :
Dart SDK version: 2.15.0-68.0.dev (dev) (Wed Sep 1 05:51:32 2021 -0700) on "linux_x64"
- A fresh Dart project created from DartCode command
Dart: New Project
and selectingsimple-console
template - Try to put a breakpoint in
print
source code
I used two ways to put this breakpoint : 1 - Using ‘Go to definition’ and add the breakpoint 2 - Launching a debug session and ‘Step into’ to reach Dart SDK source code and add the breakpoint
Two breakpoints were created with different paths, neither works :
DartCode debugging logs : Dart-Code-Log-2021-08-05 13-41-24.txt
Corresponding session in video : https://user-images.githubusercontent.com/840911/132003058-ce293e04-b9d7-4642-bc9e-2889701ea086.mp4
Issue Analytics
- State:
- Created 2 years ago
- Comments:26 (14 by maintainers)
Top Results From Across the Web
VsCode is not stopping on breakpoints - Flutter - Stack Overflow
My Dart SDK was not linked to the remote repository and was outdated so this setting was not working properly. This is done...
Read more >v3.48 - Dart Code - Dart & Flutter support for Visual Studio Code
#4074: Adding breakpoints in files that will not be hit because of debugger settings will now show a prompt even if debugger settings...
Read more >Debugging Flutter apps
DevTools; Setting breakpoints; The Dart analyzer; Logging; Debugging application layers; Debug mode assertions; Debugging animations; Measuring app startup ...
Read more >Dart | IntelliJ IDEA Documentation - JetBrains
Configure and set breakpoints in the Dart code. Initiate a debugging session: choose the created run configuration from the Edit configurations ...
Read more >#3 - How to CREATE, RUN & DEBUG a Dart Project (Terminal ...
Hi there! In this video I'll show you multiple ways on how to create, run and debug a Dart Project. All animations were...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue has been fixed for some upcoming releases. I tested it today using the current beta version of the Dart SDK (2.18.0), the pre-release v3.47.20220808 version of the Dart extension, and with the
dart.previewSdkDaps: true
setting.When using all of these, the Dart SDK libraryes (such as
dart:core
) are not mapped back to your local SDK sources (the same ones you get to using Go-to-Definition in the editor), and breakpoints set in those files will be mapped over todart:core
by the debug adapter.Some of these pieces are not released in stable releases yet, and the SDK DAPs will be a gradual roll out over the coming releases (although you can opt-in explicitly with the
dart.previewSdkDaps: true
setting).Please file issues if you still have issues with this once you have confirmed you’re on:
dart.previewSdkDaps
setting set totrue
, or you have confirmed that you’ve been enabled automatically as part of the gradual rollout (this will include the text “Running SDK DAP” in the log opened by the Dart: Open Extension Log command).I noticed today that this fix does not entirely work when running Flutter apps - they return a different
org-darlang-app:///
URI to the Dart SDK.I’ve filed https://github.com/Dart-Code/Dart-Code/issues/4128 to track this, and https://github.com/dart-lang/sdk/issues/49863 to find out if it’s a bug, and if not exactly what the mapping rules are.