diff --git a/src/views/nodes/viewNode.ts b/src/views/nodes/viewNode.ts index e2574c3..1b6e44d 100644 --- a/src/views/nodes/viewNode.ts +++ b/src/views/nodes/viewNode.ts @@ -69,6 +69,16 @@ export abstract class ViewNode { constructor(uri: GitUri, public readonly view: TView, protected readonly parent?: ViewNode) { this._instanceId = getViewNodeInstanceId(); this._uri = uri; + + if (Logger.isDebugging) { + const fn = this.getTreeItem; + this.getTreeItem = async function(this: ViewNode) { + const item = await fn.apply(this); + + item.tooltip = `${item.tooltip || item.label}\n\nDBG: ${this.toString()}`; + return item; + }; + } } toString() { @@ -111,10 +121,18 @@ export abstract class ViewRefNode extends ViewNode extends ViewRefNode { abstract get fileName(): string; + + toString() { + return `${super.toString()}:${this.fileName}`; + } } export interface PageableViewNode {