Skip to content

Commit 4a7371a

Browse files
Minor LiveSync+Debug fixes (#3109)
1 parent 3774db5 commit 4a7371a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/services/livesync/livesync-service.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
166166
} catch (err) {
167167
this.$logger.trace("Could not stop application during debug livesync. Will try to restart app instead.", err);
168168
if ((err.message || err) === "Could not find developer disk image") {
169+
// Set isFullSync here to true because we are refreshing with debugger
170+
// We want to force a restart instead of accidentally performing LiveEdit or FastSync
171+
liveSyncResultInfo.isFullSync = true;
169172
await this.refreshApplicationWithoutDebug(projectData, liveSyncResultInfo, debugOptions, outputPath, { shouldSkipEmitLiveSyncNotification: true });
170173
this.emit(USER_INTERACTION_NEEDED_EVENT_NAME, attachDebuggerOptions);
171174
return;
@@ -254,7 +257,12 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
254257
} catch (err) {
255258
this.$logger.trace("Couldn't attach debugger, will modify options and try again.", err);
256259
attachDebuggerOptions.debugOptions.start = false;
257-
debugInformation = await this.attachDebugger(attachDebuggerOptions);
260+
try {
261+
debugInformation = await this.attachDebugger(attachDebuggerOptions);
262+
} catch (innerErr) {
263+
this.$logger.trace("Couldn't attach debugger with modified options.", innerErr);
264+
throw err;
265+
}
258266
}
259267

260268
return debugInformation;

0 commit comments

Comments
 (0)