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 Debugger.Break() on failing Result.Act()'s when the debugger is attachted #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Corniel
Copy link
Contributor

@Corniel Corniel commented Apr 5, 2023

As an alternative to #64 , triggering Debugger.Break() could also be a promising way to improve the debugger experience when dealing with longer chains of Result.Act()'s.

@Corniel Corniel marked this pull request as ready for review April 5, 2023 18:12
@Corniel Corniel self-assigned this Apr 5, 2023
DebuggerWrapper.GetProperty(nameof(IsAttached)).SetValue(null, action);
}

public static void Break(bool @throw)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So a Break(true) throws an exception. And a Break(false) does a debugger.Break.
That's confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sjaaky I see your point. Do you have a suggestion? throwOnBreak? Or injection the action? Or somehting else?

@CptWesley
Copy link
Member

CptWesley commented Apr 6, 2023

My personal preference would still be to continue with #64 due to the less impactful change in experience. I can foresee scenarios where too many break points get triggered that hamper the development experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants