diff --git a/lib/services/ios-debug-service.ts b/lib/services/ios-debug-service.ts index e8511d8520..ea07fa5d98 100644 --- a/lib/services/ios-debug-service.ts +++ b/lib/services/ios-debug-service.ts @@ -204,12 +204,15 @@ class IOSDebugService implements IDebugService { private openDebuggingClient(): IFuture { return (() => { - var cmd = "open -a Safari " + this.getSafariPath().wait(); + let inspectorPath = this.getInspectorPath().wait(); + let inspectorApplicationPath = path.join(inspectorPath, "NativeScript Inspector.app"); + let inspectorSourceLocation = path.join(inspectorPath, "Safari/Main.html"); + let cmd = `open -a '${inspectorApplicationPath}' --args '${inspectorSourceLocation}' '${this.$projectData.projectName}'`; this.$childProcess.exec(cmd).wait(); }).future()(); } - private getSafariPath(): IFuture { + private getInspectorPath(): IFuture { return (() => { var tnsIosPackage = ""; if (this.$options.frameworkPath) { @@ -221,8 +224,8 @@ class IOSDebugService implements IDebugService { var platformData = this.$platformsData.getPlatformData(this.platform); tnsIosPackage = this.$npmInstallationManager.install(platformData.frameworkPackageName).wait(); } - var safariPath = path.join(tnsIosPackage, "WebInspectorUI/Safari/Main.html"); - return safariPath; + var inspectorPath = path.join(tnsIosPackage, "WebInspectorUI/"); + return inspectorPath; }).future()(); } }