Skip to content

Commit 43ddc68

Browse files
committed
Log source mappings
Found this lacking when I was trying to repro the issue, and thought it was in the C# formatter itself.
1 parent f6afbc7 commit 43ddc68

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/CSharpFormattingPass.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public async Task<ImmutableArray<TextChange>> ExecuteAsync(FormattingContext con
2828
// Process changes from previous passes
2929
var changedText = context.SourceText.WithChanges(changes);
3030
var changedContext = await context.WithTextAsync(changedText, cancellationToken).ConfigureAwait(false);
31+
context.Logger?.LogObject("SourceMappings", changedContext.CodeDocument.GetRequiredCSharpDocument().SourceMappings);
3132

3233
// To format C# code we generate a C# document that represents the indentation semantics the user would be
3334
// expecting in their Razor file. See the doc comments on CSharpDocumentGenerator for more info

0 commit comments

Comments
 (0)