JavaScript source code instead of Dart source code is shown when displaying toString for closures
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 2
Description
Copying over https://github.com/flutter/flutter/issues/68506
It would be more useful for users if we showed the source mapped Dart source code instead like we source map stack traces. An alternative could be to just display the type signature and let users navigate to the source location if they want to see the implementation.
Repro: view any closure in the debugger. You will see the distracting JS source code.

Fyi @nshahan
Contributor guide
Research direction
Reproduce the issue by viewing any closure in the debugger and confirm that JavaScript source is displayed. Review the debugger's existing source-mapped stack-trace behavior, then make closure display use mapped Dart source or the stated type-signature alternative; viewing a closure should no longer show distracting JavaScript implementation code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100