dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.22k stars 1.57k forks source link

DDC source maps allow stepping (but not breaking) on certain lines #32207

Open jmesserly opened 6 years ago

jmesserly commented 6 years ago

After the fix for #32083 many more lines are correctly stepping, but in some cases they are not allowing breakpoints to be set on that line (even though there are clearly valid source mappings for the line).

This may be an issue with not marking the start of the statement(?) although that is supposed to be happening always. Perhaps Chrome+V8 looks for certain offsets/spans to be marked, and if they're not, it gives up with setting the breakpoint. It seems inconsistent so we need to gather some repros.

CC @vsmenon

jmesserly commented 6 years ago

I wonder if the sheer size of our generated code+source maps might be stressing the Chrome JS debugger beyond some of its size assumptions.

jmesserly commented 6 years ago

I think @vsmenon is trying to narrow down a repro for this (so far we've only seen it in large, complex apps; extracting the problematic methods does not reproduce the problem, even if we're careful with types to ensure the same JS is generated by DDC. So it seems like there's some non-local effects going on here.)