main
1using System;
2using System.Diagnostics;
3
4namespace MoMoney.Service.Infrastructure.debugging
5{
6 static public class Launch
7 {
8 static public void the_debugger()
9 {
10#if DEBUG
11 if (Debugger.IsAttached) Debugger.Break();
12 else Debugger.Launch();
13#endif
14 }
15
16 static public void the_debugger_if(Func<bool> condition)
17 {
18#if DEBUG
19 if (!condition()) return;
20
21 if (Debugger.IsAttached) Debugger.Break();
22 else Debugger.Launch();
23#endif
24 }
25 }
26}