(request: string, response: DebugProtocol.Response, args: any)
| 206 | } |
| 207 | |
| 208 | protected async customRequest(request: string, response: DebugProtocol.Response, args: any): Promise<void> { |
| 209 | try { |
| 210 | switch (request) { |
| 211 | case "hotReload": |
| 212 | if (this.currentRunningAppId) |
| 213 | await this.performReload(false, args as { reason: string, debounce?: boolean }); |
| 214 | this.sendResponse(response); |
| 215 | break; |
| 216 | |
| 217 | case "hotRestart": |
| 218 | if (this.currentRunningAppId) { |
| 219 | this.reloadPackageMap(); |
| 220 | await this.performReload(true, args as { reason: string, debounce?: boolean }); |
| 221 | } |
| 222 | this.sendResponse(response); |
| 223 | break; |
| 224 | |
| 225 | default: |
| 226 | await super.customRequest(request, response, args); |
| 227 | break; |
| 228 | } |
| 229 | } catch (e: any) { |
| 230 | const error = errorString(e); |
| 231 | const message = `Error handling '${request}' custom request: ${error}`; |
| 232 | |
| 233 | if (!this.isTerminating) |
| 234 | this.sendEvent(new OutputEvent(`${message}\n`, "stderr")); |
| 235 | this.logger.error(message); |
| 236 | this.errorResponse(response, message); |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | protected async handleInspectEvent(event: VMEvent): Promise<void> { |
| 241 | if (!this.runDaemon || !this.currentRunningAppId) |
no test coverage detected