Files
Jonatan GonzalezandAndy Zivkovic c8dccb7126 Enable GenerateDocumentationFile (#6000)
Enable GenerateDocumentationFile, allowing for IDE0005 to be caught during builds. Cleaned up unnecessary using statements. 

Co-authored-by: Andy Zivkovic <zivkan@users.noreply.github.com>
2024-09-09 12:05:32 -07:00

31 lines
731 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Diagnostics;
#if IS_CORECLR
using System;
#endif
namespace Test.Utility
{
public static class DebuggerUtils
{
public static void WaitForDebugger()
{
#if IS_CORECLR
Console.WriteLine("Waiting for debugger to attach.");
Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}");
while (!Debugger.IsAttached)
{
System.Threading.Thread.Sleep(100);
}
Debugger.Break();
#else
Debugger.Launch();
#endif
}
}
}