(response: DebugProtocol.SourceResponse, args: DebugProtocol.SourceArguments)
| 623 | } |
| 624 | |
| 625 | protected sourceRequest(response: DebugProtocol.SourceResponse, args: DebugProtocol.SourceArguments): void { |
| 626 | const sourceReference = args.sourceReference; |
| 627 | const data = this.threadManager.getStoredData(sourceReference); |
| 628 | const scriptRef: VMScriptRef = data.data as VMScriptRef; |
| 629 | |
| 630 | data.thread.getScript(scriptRef).then((script: VMScript) => { |
| 631 | if (script.source) { |
| 632 | response.body = { content: script.source, mimeType: "text/x-dart" }; |
| 633 | } else { |
| 634 | response.success = false; |
| 635 | response.message = "<source not available>"; |
| 636 | } |
| 637 | this.sendResponse(response); |
| 638 | }).catch((error) => this.errorResponse(response, `${error}`)); |
| 639 | } |
| 640 | |
| 641 | protected threadsRequest(response: DebugProtocol.ThreadsResponse): void { |
| 642 | response.body = { threads: this.threadManager.getThreads() }; |
nothing calls this directly
no test coverage detected