示例#1
0
 private static void BreakCanThrow()
 {
     if (!Debugger.IsAttached)
     {
         new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
     }
     Debugger.BreakInternal();
 }
示例#2
0
 public static void Break()
 {
     if (!Debugger.IsAttached)
     {
         try
         {
             new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
         }
         catch (SecurityException)
         {
             return;
         }
     }
     Debugger.BreakInternal();
 }