Commit 2172ba7
authored
Support breakpoints for hot reload (#2627)
Adds support for properly reregistering breakpoints across
a hot reload. Like with hot restart, leverages the kPausePostRequest
event in order to reregister breakpoints. DWDS does the initial
work to load the new sources in ("hotReloadStart"), and pauses and
sends the request. Upon disabling existing breakpoint, reregistering
and registering new breakpoints and resuming, DWDS will resume the
app and push the new sources into the runtime ("hotReloadEnd").
Also reinitializes some cached information in order to compute new
sources. Note that it's very conservative for now. A future change
should optimize the invalidation.
See #2628 for that work.
Adds tests for the following cases:
Editing a line with a breakpoint.
Adding a line before a breakpoint.
Removing a line before a breakpoint.
Adding a new file with a breakpoint in it.
Breakpoint in previously captured code is removed.
There's no pause when pause_isolates_on_start is false.
dart-lang/sdk#60186
Includes a light refactor of testing to create temp directories wherever the TestProject needs to be edited. TestProjects should specify whether it's meant to be edited via editable and list its dependencies so they can be copied too.1 parent 7f376d2 commit 2172ba7
File tree
70 files changed
+1540
-1012
lines changed- dwds
- lib/src
- debugging
- injected
- services
- utilities
- test
- common
- fixtures
- instances
- readers
- web
- reloader
- fixtures
- _testHotReloadBreakpoints
- web
- _testHotReload/web
- test_common
- lib
- test
- webdev/test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
70 files changed
+1540
-1012
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
106 | | - | |
107 | 117 | | |
108 | | - | |
109 | 118 | | |
110 | 119 | | |
| 120 | + | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
| |||
702 | 712 | | |
703 | 713 | | |
704 | 714 | | |
705 | | - | |
706 | | - | |
| 715 | + | |
707 | 716 | | |
708 | 717 | | |
709 | 718 | | |
| |||
0 commit comments