Skip to content

Minor LiveSync+Debug fixes #3109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2017
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