(hotRestart: boolean, args?: { reason: string, debounce?: boolean })
| 187 | } |
| 188 | |
| 189 | private async performReload(hotRestart: boolean, args?: { reason: string, debounce?: boolean }): Promise<any> { |
| 190 | if (!this.appHasStarted || !this.currentRunningAppId || !this.runDaemon) |
| 191 | return; |
| 192 | |
| 193 | const restartType = hotRestart ? "hot-restart" : "hot-reload"; |
| 194 | |
| 195 | // To avoid issues with hot restart pausing on exceptions during the restart, we remove |
| 196 | // exception-pause behaviour here, and it will be re-added as part of the startup code |
| 197 | // when the new isolate appears. |
| 198 | if (hotRestart) |
| 199 | await this.threadManager.setExceptionPauseMode("None", false); |
| 200 | |
| 201 | try { |
| 202 | await this.runDaemon.restart(this.currentRunningAppId, !this.noDebug, hotRestart, args); |
| 203 | } catch (e) { |
| 204 | this.sendEvent(new OutputEvent(`Error running ${restartType}: ${e}\n`, "stderr")); |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | protected async customRequest(request: string, response: DebugProtocol.Response, args: any): Promise<void> { |
| 209 | try { |
no test coverage detected