Open DanTup opened 6 hours ago
Summary: Breakpoints are not working on variable assignments wrapped in parentheses, preventing stepping into functions called within the assignment. This issue arises from a recent change intended to improve breakpoint behavior, but it seems to have unintended consequences for certain code patterns.
A change was recently made to prevent breakpoints from jumping to different lines than the one where they were added if the location was invalid (https://github.com/dart-lang/sdk/issues/56820). While I think the idea is right, it seems to have impacted some kinds of code I hadn't considered and I'm not sure it's a good experience.
Consider this code:
I wanted to step into
ElementLocator.locate
so I put a breakpoint on line 78 expecting it to be the correct one (because I wanted to stop on this statement). However, line 78 is not a valid location to stop, so now we don't pause at all and it feels like a bug.I'm not sure I could define rules that would fix this without reverting the change for https://github.com/dart-lang/sdk/issues/56820, but perhaps someone more familiar with the internals could.
@bkonyi @derekxu16