From c707e80463fa1bf7f39493c17c7731d29e53ee02 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 25 May 2016 07:59:26 -0700 Subject: [PATCH] Show indent and childItems when debugging the navigation bar --- src/harness/fourslash.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 7f2972e8125..4fd3161d1dc 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1096,14 +1096,6 @@ namespace FourSlash { } addSpanInfoString(); return resultString; - - function repeatString(count: number, char: string) { - let result = ""; - for (let i = 0; i < count; i++) { - result += char; - } - return result; - } } public getBreakpointStatementLocation(pos: number) { @@ -2055,7 +2047,7 @@ namespace FourSlash { for (let i = 0; i < length; i++) { const item = items[i]; - Harness.IO.log(`name: ${item.text}, kind: ${item.kind}`); + Harness.IO.log(`${repeatString(item.indent, " ")}name: ${item.text}, kind: ${item.kind}, childItems: ${item.childItems.map(child => child.text)}`); } } @@ -2742,6 +2734,14 @@ ${code} fileName: fileName }; } + + function repeatString(count: number, char: string) { + let result = ""; + for (let i = 0; i < count; i++) { + result += char; + } + return result; + } } namespace FourSlashInterface {