Dart-Code: Breakpoints in Dart SDK code are not hit
I 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
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 26 (14 by maintainers)
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).