Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting breakpoints on ternary branches #30646

Closed
jnm2 opened this issue Oct 22, 2018 · 5 comments
Closed

Allow setting breakpoints on ternary branches #30646

jnm2 opened this issue Oct 22, 2018 · 5 comments
Labels
Feature Request Interactive-Debugging Resolution-Duplicate The described behavior is tracked in another issue
Milestone

Comments

@jnm2
Copy link
Contributor

jnm2 commented Oct 22, 2018

The penalty for using ternaries instead of if statements is that breakpoints can't be set for each branch. When you're in the middle of debugging, it's too late to refactor. Sometimes you can set a breakpoint on the whole statement and duplicate the effective condition, but this expression may be nested inside another ternary or in a long initializer expression; even when you can duplicate the condition without side effects, it's frustrating to put together.

Similar to #30645, possibly covered by #22016.

@jnm2
Copy link
Contributor Author

jnm2 commented Oct 22, 2018

Besides common debugging scenarios, another reason I'm really hoping for sequence points to be emitted for expressions is that Live Unit Testing (last I tried it), ReSharper's test coverage, and NCrunch all use statement or line granularity. The lack of expression granularity obfuscates the true branch coverage situation.

@jnm2
Copy link
Contributor Author

jnm2 commented Oct 22, 2018

When switch expressions arrive, this will become even more important.

@jinujoseph
Copy link
Contributor

looks same as #22016 , cc @tmat

@jinujoseph jinujoseph added Interactive-Debugging Feature Request help wanted The issue is "up for grabs" - add a comment if you are interested in working on it labels Oct 22, 2018
@jinujoseph jinujoseph added this to the Unknown milestone Oct 22, 2018
@jinujoseph jinujoseph removed the help wanted The issue is "up for grabs" - add a comment if you are interested in working on it label Oct 22, 2018
@tmat tmat added the Resolution-Duplicate The described behavior is tracked in another issue label Oct 22, 2018
@tmat
Copy link
Member

tmat commented Oct 22, 2018

Yes, this is covered by #22016. I don't think we need to track it in multiple issues.

@tmat tmat closed this as completed Oct 22, 2018
@jnm2
Copy link
Contributor Author

jnm2 commented Apr 5, 2020

Now tracked by #43092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Interactive-Debugging Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

3 participants