Skip to content

Commit

Permalink
Improve debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Dec 27, 2020
1 parent ae2833c commit 10d7fd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Formatting.Analyzers.CodeFixes/FormattingVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ public static void VerifyChangedSpansAreWhitespace(SyntaxNode node, IList<TextCh
{
if (!VerifyTextChange(textChange))
{
Debug.Fail($"Cannot find matching trivia for TextChange {textChange}\r\n\r\n{node}");
Debug.Fail("Cannot find matching trivia for TextChange.\r\n"
+ $"span: {textChange.Span}\r\n"
+ $"new text: {textChange.NewText}\r\n"
+ $"new text length: {textChange.NewText.Length}\r\n"
+ $"node:\r\n{node}");

break;
}
}
Expand Down

0 comments on commit 10d7fd8

Please sign in to comment.