Commit 5952bf2
authored
Fix WASM debugger breakpoints not hitting after Terser 5.39+. (#123353)
Terser 5.39 introduced an optimization that removes console.assert(true,
...) as "unnecessary"
https://github.com/terser/terser/blob/master/CHANGELOG.md#v5390.
In runtime we are counting on the assert to keep `base64String`:
https://github.com/dotnet/runtime/blob/1af7e1a9b7d659fdb9e2bc7aa52197fd5d272ec6/src/mono/browser/runtime/debug.ts#L37
The assert removal caused the `base64String` to be optimized away,
breaking the `BrowserDebugProxy's `, breaking the ability to read them
from the paused scope.
<img width="2725" height="204" alt="image"
src="https://github.com/user-attachments/assets/a55233c9-fe3e-4c5e-99fb-36a5f02b7dba"
/>
This affects net11 debugging, net10 works correctly.
This PR replaces `true` with `!!Date.now()` which Terser cannot
statically evaluate.1 parent d5df04f commit 5952bf2
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
| 167 | + | |
| 168 | + | |
167 | 169 | | |
168 | | - | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
0 commit comments