Commit b887407
committed
Support breakpoints for hot reload
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.
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.1 parent 6759806 commit b887407
File tree
15 files changed
+832
-282
lines changed- dwds
- lib/src
- debugging
- injected
- services
- test
- fixtures
- web
- reloader
- fixtures
- _testHotReloadBreakpoints
- web
- _testHotReload/web
15 files changed
+832
-282
lines changed| 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