(arg: any)
| 884 | } |
| 885 | |
| 886 | private addToLiveWatch(arg: any) { |
| 887 | if (!arg || !arg.sessionId) { |
| 888 | return; |
| 889 | } |
| 890 | const mySession = CDebugSession.FindSessionById(arg.sessionId); |
| 891 | if (!mySession) { |
| 892 | vscode.window.showErrorMessage(`addToLiveWatch: Unknown debug session id ${arg.sessionId}`); |
| 893 | return; |
| 894 | } |
| 895 | const parent = arg.container; |
| 896 | const expr = arg.variable?.evaluateName; |
| 897 | if (parent && expr) { |
| 898 | const varRef = parent.variablesReference; |
| 899 | mySession.session.customRequest('is-global-or-static', {varRef: varRef}).then((result) => { |
| 900 | if (!result.success) { |
| 901 | vscode.window.showErrorMessage(`Cannot add ${expr} to Live Watch. Must be a global or static variable`); |
| 902 | } else { |
| 903 | this.liveWatchProvider.addWatchExpr(expr, vscode.debug.activeDebugSession); |
| 904 | } |
| 905 | }, (e) => { |
| 906 | console.log(e); |
| 907 | }); |
| 908 | } |
| 909 | } |
| 910 | |
| 911 | private removeLiveWatchExpr(node: any) { |
| 912 | this.liveWatchProvider.removeWatchExpr(node); |
nothing calls this directly
no test coverage detected