Skip to content

Commit 6e86596

Browse files
committed
Add debugging utilities
1 parent cc6affa commit 6e86596

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/harness/fourslash.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) Microsoft Corporation. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -2550,6 +2550,11 @@ namespace FourSlash {
25502550
}
25512551
}
25522552

2553+
public printAvailableCodeFixes() {
2554+
const codeFixes = this.getCodeFixActions(this.activeFile.fileName);
2555+
Harness.IO.log(stringify(codeFixes));
2556+
}
2557+
25532558
// Get the text of the entire line the caret is currently at
25542559
private getCurrentLineContent() {
25552560
const text = this.getFileContent(this.activeFile.fileName);
@@ -3738,6 +3743,10 @@ namespace FourSlashInterface {
37383743
this.state.printCompletionListMembers();
37393744
}
37403745

3746+
public printAvailableCodeFixes() {
3747+
this.state.printAvailableCodeFixes();
3748+
}
3749+
37413750
public printBreakpointLocation(pos: number) {
37423751
this.state.printBreakpointLocation(pos);
37433752
}

tests/cases/fourslash/fourslash.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ declare namespace FourSlashInterface {
296296
printCurrentQuickInfo(): void;
297297
printCurrentSignatureHelp(): void;
298298
printCompletionListMembers(): void;
299+
printAvailableCodeFixes(): void;
299300
printBreakpointLocation(pos: number): void;
300301
printBreakpointAtCurrentLocation(): void;
301302
printNameOrDottedNameSpans(pos: number): void;

0 commit comments

Comments
 (0)