Skip to content

Conversation

@Evangelink
Copy link
Member

Fixes #2033.

I have thought about having this as a platform feature but there is really few code to add. Besides, it would need to be introduced through a new mechanism as the message bus we are using could result in the debugger launch being triggered pretty far from the time of error.

internal static void ThrowAssertFailed(string assertionName, string? message)
=> throw new AssertFailedException(
{
if (AssertionFailureSettings.LaunchDebuggerOnFailure)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is acting only on assertion failures, we could also consider the same call in case of an exception being thrown or a timeout occuring in the test.

Copy link

@aha8med7788-svg aha8med7788-svg left a comment

Choose a reason for hiding this comment

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

@nohwnd
Copy link
Member

nohwnd commented Feb 2, 2026

Will the debugger launch block in non-interactive session / interactive ci session? Maybe you want to detect CI and not do it.

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.

Option to launch debugger on test failure

5 participants