This would be in the same vein as https://github.com/dotnet/roslyn/issues/22016 which added breakpoints for the arms of a switch expression. Filed as asked by @gafter.
Please add sequence points to enable setting breakpoints on:
&&, ||, and ???. and ?[When you're in the middle of debugging, it's too late to refactor expressions to statements. Sometimes you can set a breakpoint on the whole statement and duplicate the effective condition using the breakpoint condition feature, but this expression may be nested inside other expressions. It's frustrating to put together even when you can duplicate the condition without side effects.
A benefit of more granular expression sequence points is that code coverage tools will begin to recognize conditional expressions and short-circuiting operators as branches. All the code coverage tools that I've looked into or heard from are dependent on debugger sequence points. I'm hoping for a world where things like && and ?. are tracked as branching by Live Unit Testing and third-party tools.
This is an _absolutely_ excellent suggestion; that at minimum holds up the future outlook! 馃 Granular progress on branches!
Very nice sir!
Be safe!
The potential downside of doing this is that single-stepping may have many more intermediate steps. I'm proposing to implement this as an experimental compiler feature (enabled with a feature flag) to gather some experience with it.
The potential downside of doing this is that single-stepping may have many more intermediate steps. I'm proposing to implement this as an experimental compiler feature (enabled with a feature flag) to gather some experience with it.
Isn't experience better gathered by making the feature as available as possible? The agile world is long into the framework.
I felt that the configuration would be a type of hassle; and limit the casual usage arbitrarily too.
I don't think it would be a good idea to subject all of our customers to a possibly failing experiment. We'd prefer to keep our customers productive.
Linked issue: https://github.com/dotnet/roslyn/issues/21781 , also suggests using a new compiler flag for this and leave the default behavior as is.
Most helpful comment
The potential downside of doing this is that single-stepping may have many more intermediate steps. I'm proposing to implement this as an experimental compiler feature (enabled with a feature flag) to gather some experience with it.