Skip to content

Commit

Permalink
Remove hardcoded calls to System.Diagnostics.Debugger.Break (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveTryon authored Apr 9, 2020
1 parent 37c2a2b commit c5b5cc3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 18 deletions.
8 changes: 0 additions & 8 deletions src/Core/Misc/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,6 @@ public static ScanStatus GetAggregatedScanStatus(this IEnumerable<ScanStatus> ts
{
return ScanStatus.Uncertain;
}
else if (HasTestResults(tss, ScanStatus.NoResult))
{
// it means that there was no rule executed or
if (System.Diagnostics.Debugger.IsAttached)
{
System.Diagnostics.Debugger.Break();
}
}

return ScanStatus.Pass;
}
Expand Down
4 changes: 0 additions & 4 deletions src/Desktop/UIAutomation/DesktopElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ protected override void Dispose(bool disposing)
catch (Exception e)
{
e.ReportException();
if (System.Diagnostics.Debugger.IsAttached)
{
System.Diagnostics.Debugger.Break();
}
}
#pragma warning restore CA1031 // Do not catch general exception types
}
Expand Down
5 changes: 0 additions & 5 deletions src/RuleSelection/RuleRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public static void Run(A11yElement e)
catch (Exception ex)
{
ex.ReportException();
if (System.Diagnostics.Debugger.IsAttached)
{
System.Diagnostics.Debug.WriteLine(ex.ToString());
System.Diagnostics.Debugger.Break();
}
}
#pragma warning restore CA1031 // Do not catch general exception types
}
Expand Down
2 changes: 2 additions & 0 deletions src/Rules/Conditions/Condition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public static Condition Create(DelegateCondition.MatchesDelegate d, string descr

public static Condition True = Create(e => true, ConditionDescriptions.True);
public static Condition False = Create(e => false, ConditionDescriptions.False);
#if DEBUG
public static Condition DebugBreak = Create(e => { System.Diagnostics.Debugger.Break(); return true; });
#endif
} // class
} // namespace
1 change: 0 additions & 1 deletion src/RulesTest/MonsterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Axe.Windows.Core.Enums;
using Axe.Windows.UnitTestSharedLibrary;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

Expand Down

0 comments on commit c5b5cc3

Please sign in to comment.