-
Notifications
You must be signed in to change notification settings - Fork 843
Closed
Labels
Area-Debugstepping, debug points, stacks and morestepping, debug points, stacks and moreFeature ImprovementImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Description
Complex boolean logic is quite common in F#, e.g. see examples below. It is really hard to debug.
I propose we add debug points on left and right of a && b and a || b so you can step through this logic and hit breakpoints.
C# doesn't allow breaking in boolean logic or any expression. However
- F# already steps through any
matchandif ... then .. elseexpressions so adding this seems natural enough. - I believe complex boolean logic is more common in F# than C# because of the expression-oriented nature of the language
A possible downside is that of "too much stepping" so it takes too long to step through a function. However I've been frustrated by the lack of debugging for boolean logic enough that I think we should prefer the addditional debug points.
Examples
let isRecdOrStructTyconRefAssumedImmutable (g: TcGlobals) (tcref: TyconRef) =
tcref.CanDeref &&
not (isRecdOrUnionOrStructTyconRefDefinitelyMutable tcref) ||
tyconRefEq g tcref g.decimal_tcr ||
tyconRefEq g tcref g.date_tcr
or
zanaptak, En3Tho and vzarytovskii
Metadata
Metadata
Assignees
Labels
Area-Debugstepping, debug points, stacks and morestepping, debug points, stacks and moreFeature ImprovementImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
