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

Increase WaitForTimeout when a debugger is attached #1177

Closed
linkdotnet opened this issue Aug 13, 2023 · 0 comments · Fixed by #1178
Closed

Increase WaitForTimeout when a debugger is attached #1177

linkdotnet opened this issue Aug 13, 2023 · 0 comments · Fixed by #1178

Comments

@linkdotnet
Copy link
Sponsor Collaborator

linkdotnet commented Aug 13, 2023

Often times, when I want to debug an issue, I will have to set the timeout for WaitForHelpers manually to something like TimeSpan.FromMinutes(5) so it's easier to debug.

My proposal would be to check whether or not a debugger is attached, if so, and no other timeout is given, increase it automatically to 5 minutes:

private static TimeSpan GetRuntimeTimeout(TimeSpan? timeout)
{
	var defaultWaitTimeout = Debugger.IsAttached
		? TimeSpan.FromMinutes(5)
		: TestContextBase.DefaultWaitTimeout;
	return timeout ?? defaultWaitTimeout;
}

That would be the basic idea.

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

Successfully merging a pull request may close this issue.

1 participant