(response: DebugProtocol.EvaluateResponse, args: DebugProtocol.EvaluateArguments)
| 690 | } |
| 691 | |
| 692 | protected evaluateRequest(response: DebugProtocol.EvaluateResponse, args: DebugProtocol.EvaluateArguments): void { |
| 693 | const [threadId, level] = this.frameIdToThreadAndLevel(args.frameId); |
| 694 | if (args.context == "watch" || args.context == "hover") { |
| 695 | this.miDebugger.evalExpression(args.expression, threadId, level).then((res) => { |
| 696 | response.body = { |
| 697 | variablesReference: 0, |
| 698 | result: res.result("value") |
| 699 | }; |
| 700 | this.sendResponse(response); |
| 701 | }, msg => { |
| 702 | this.sendErrorResponse(response, 7, msg.toString()); |
| 703 | }); |
| 704 | } else { |
| 705 | this.miDebugger.sendUserInput(args.expression, threadId, level).then(output => { |
| 706 | if (typeof output == "undefined") |
| 707 | response.body = { |
| 708 | result: "", |
| 709 | variablesReference: 0 |
| 710 | }; |
| 711 | else |
| 712 | response.body = { |
| 713 | result: JSON.stringify(output), |
| 714 | variablesReference: 0 |
| 715 | }; |
| 716 | this.sendResponse(response); |
| 717 | }, msg => { |
| 718 | this.sendErrorResponse(response, 8, msg.toString()); |
| 719 | }); |
| 720 | } |
| 721 | } |
| 722 | |
| 723 | protected gotoTargetsRequest(response: DebugProtocol.GotoTargetsResponse, args: DebugProtocol.GotoTargetsArguments): void { |
| 724 | const path: string = this.isSSH ? this.sourceFileMap.toRemotePath(args.source.path) : args.source.path; |
nothing calls this directly
no test coverage detected