Skip to content

Commit d86727c

Browse files
committed
Adding type of expression to tooltip of the item
1 parent 68733d0 commit d86727c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/views/live-watch/live-watch.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ interface LiveWatchNode {
2929
export interface LiveWatchValue {
3030
result: string;
3131
variablesReference: number;
32+
type?: string;
3233
}
3334

3435
export class LiveWatchTreeDataProvider implements vscode.TreeDataProvider<LiveWatchNode> {
@@ -80,7 +81,7 @@ export class LiveWatchTreeDataProvider implements vscode.TreeDataProvider<LiveWa
8081
const item = new vscode.TreeItem(element.expression + ' = ');
8182
item.description = element.value.result;
8283
item.contextValue = 'expression';
83-
item.tooltip = element.expression;
84+
item.tooltip = element.value.type;
8485
item.collapsibleState = element.value.variablesReference !== 0 ? vscode.TreeItemCollapsibleState.Collapsed : vscode.TreeItemCollapsibleState.None;
8586
return item;
8687
}
@@ -211,6 +212,7 @@ export class LiveWatchTreeDataProvider implements vscode.TreeDataProvider<LiveWa
211212
}
212213
response.result = result.result;
213214
response.variablesReference = result.variablesReference;
215+
response.type = result.type ?? '';
214216
return response;
215217
}
216218

0 commit comments

Comments
 (0)