Skip to content

Commit d3ffde6

Browse files
committed
Fix live edit on device
In case of live edit on device, the getDevicePath does not return the absolute device path. So pass a relative path instead and the runtime would handle it.
1 parent 2754b14 commit d3ffde6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/services/livesync/ios-device-livesync-service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ class IOSLiveSyncService implements IDeviceLiveSyncService {
4242
return true;
4343
}
4444

45-
let enableDebuggerMessage = `{ "method":"Debugger.enable","id":${++currentPageReloadId} }`;
4645
if (this.device.isEmulator) {
4746
this.$iOSEmulatorServices.postDarwinNotification(this.$iOSNotification.attachRequest).wait();
4847
try {
@@ -59,7 +58,6 @@ class IOSLiveSyncService implements IDeviceLiveSyncService {
5958
}
6059

6160
this.attachEventHandlers();
62-
this.sendMessage(enableDebuggerMessage).wait();
6361

6462
return true;
6563
}).future<boolean>()();
@@ -131,7 +129,7 @@ class IOSLiveSyncService implements IDeviceLiveSyncService {
131129
let message = JSON.stringify({
132130
method: "Debugger.setScriptSource",
133131
params: {
134-
scriptUrl: localToDevicePath.getDevicePath(),
132+
scriptUrl: localToDevicePath.getRelativeToProjectBasePath(),
135133
scriptSource: content
136134
},
137135
id: ++currentPageReloadId

0 commit comments

Comments
 (0)