MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / performReload

Method performReload

src/debug/web_debug_impl.ts:189–206  ·  view source on GitHub ↗
(hotRestart: boolean, args?: { reason: string, debounce?: boolean })

Source from the content-addressed store, hash-verified

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 {

Callers 2

restartRequestMethod · 0.95
customRequestMethod · 0.95

Calls 3

restartMethod · 0.80
sendEventMethod · 0.80
setExceptionPauseModeMethod · 0.45

Tested by

no test coverage detected