Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/services/livesync/livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
} catch (err) {
this.$logger.trace("Could not stop application during debug livesync. Will try to restart app instead.", err);
if ((err.message || err) === "Could not find developer disk image") {
// Set isFullSync here to true because we are refreshing with debugger
// We want to force a restart instead of accidentally performing LiveEdit or FastSync
liveSyncResultInfo.isFullSync = true;
await this.refreshApplicationWithoutDebug(projectData, liveSyncResultInfo, debugOptions, outputPath, { shouldSkipEmitLiveSyncNotification: true });
this.emit(USER_INTERACTION_NEEDED_EVENT_NAME, attachDebuggerOptions);
return;
Expand Down Expand Up @@ -254,7 +257,12 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
} catch (err) {
this.$logger.trace("Couldn't attach debugger, will modify options and try again.", err);
attachDebuggerOptions.debugOptions.start = false;
debugInformation = await this.attachDebugger(attachDebuggerOptions);
try {
debugInformation = await this.attachDebugger(attachDebuggerOptions);
} catch (innerErr) {
this.$logger.trace("Couldn't attach debugger with modified options.", innerErr);
throw err;
}
}

return debugInformation;
Expand Down