Skip to content

debugger: Add breakpoints to every Stmt

Rodrigo Mesquita requested to merge wip/romes/25932 into master

While single-stepping through a Haskell program we stop at every breakpoint. However, we don't introduce breakpoints at every single expression (e.g. single variables) because they would be too many and uninteresting.

That said, in a do-block, it is expected that stepping over would break at every line, even if it isn't particularly interesting (e.g. a single arg like getArgs). Moreover, let-statements in do-blocks, despite only being evaluated once needed, lead to surprising jumps while stepping through because some have outermost (outside the let) breakpoints while others don't.

This commit makes every statement in a do-block have a breakpoint. This leads to predictable stepping through in a do-block. Duplicate breakpoints in the same location are avoided using the existing blacklist mechanism, which was missing a check in one relevant place.

Fixes #25932 (closed)

Edited by Matthew Pickering

Merge request reports

Loading