flutter / flutter/devtools

Code view likely references old script objects after hot reload

Open
#6,151 0 comments 0 reactions 0 assignees View on GitHub
P2 screen: debugger
Dominant language
Dart
Stars
1.7k
Forks
404
Avg merge
6d 17h
Merged PRs (30d)
18

Description

If a script is changed as the result of a hot reload, the `Script` object needs to be re-retrieved to get its updated VM service object ID as the internal `Script` object has been replaced by the VM.

Some issues that are likely related to this are:
- Code coverage and profiler hits disappear after a hot reload
- Rendered sources are out of date after a hot reload
- Breakpoint state isn't cleared in scripts that were hot reloaded (e.g., breakpoints are displayed even though they aren't automatically reset for the new script)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Code view's Script lookup during hot reload and how it obtains the VM service object ID. Use the reported coverage and profiler hits, rendered sources, and breakpoint state as verification points; done means these remain correct after a script is hot reloaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.