(params: Dap.SourceParams)
| 187 | } |
| 188 | |
| 189 | async _onSource(params: Dap.SourceParams): Promise<Dap.SourceResult | Dap.Error> { |
| 190 | if (!params.source) { |
| 191 | params.source = { sourceReference: params.sourceReference }; |
| 192 | } |
| 193 | |
| 194 | params.source.path = urlUtils.platformPathToPreferredCase(params.source.path); |
| 195 | const source = this.sourceContainer.source(params.source); |
| 196 | if (!source) |
| 197 | return errors.createSilentError(localize('error.sourceNotFound', 'Source not found')); |
| 198 | const content = await source.content(); |
| 199 | if (content === undefined) |
| 200 | return errors.createSilentError( |
| 201 | localize('error.sourceContentDidFail', 'Unable to retrieve source content'), |
| 202 | ); |
| 203 | return { content, mimeType: source.mimeType() }; |
| 204 | } |
| 205 | |
| 206 | async _onThreads(): Promise<Dap.ThreadsResult | Dap.Error> { |
| 207 | const threads: Dap.Thread[] = []; |
no test coverage detected