{"action":"created","comment":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments/72202599","id":72202599,"diff_hunk":"@@ -1,14 +1,47 @@\n ﻿export class DebugPlatformCommand implements ICommand {\n \tconstructor(private debugService: IDebugService,\n \t\tprivate $devicesService: Mobile.IDevicesService,\n-\t\tprivate $usbLiveSyncService: ILiveSyncService,\n+\t\tprivate $injector: IInjector,\n \t\tprivate $logger: ILogger,\n+\t\tprivate $childProcess: IChildProcess,\n+\t\tprivate $devicePlatformsConstants: Mobile.IDevicePlatformsConstants,\n \t\tprotected $options: IOptions) { }\n \n \texecute(args: string[]): IFuture<void> {\n-\t\tif (!this.$options.rebuild) {\n+\t\tif (!this.$options.rebuild && !this.$options.start) {\n \t\t\tthis.$options.debug = true;\n-\t\t\treturn this.$usbLiveSyncService.liveSync(this.$devicesService.platform);\n+\t\t\tlet usbLiveSyncService: ILiveSyncService = this.$injector.resolve(\"usbLiveSyncService\");\n+\t\t\tlet liveSyncServiceBase: any = this.$injector.resolve(\"liveSyncServiceBase\");\n+\t\t\tlet liveSyncProvider: ILiveSyncProvider = this.$injector.resolve(\"liveSyncProvider\");\n+\n+\t\t\tliveSyncServiceBase.on(\"sync\", (device: Mobile.IDevice, data: ILiveSyncData) => {\n+\t\t\t\tlet platformLiveSyncService: IPlatformLiveSyncService = this.$injector.resolve(liveSyncProvider.platformSpecificLiveSyncServices[data.platform.toLowerCase()], { _device: device });\n+\t\t\t\tlet projectData: IProjectData = this.$injector.resolve(\"projectData\");\n+\t\t\t\tlet appId = device.isEmulator ? projectData.projectName : data.appIdentifier;\n+\t\t\t\tif (data.platform === this.$devicePlatformsConstants.iOS) {\n+\t\t\t\t\ttry {\n+\t\t\t\t\t\tthis.$childProcess.exec(\"/usr/bin/killall 'NativeScript Inspector'\").wait();\n+\t\t\t\t\t} catch (e) {","path":"lib/commands/debug.ts","position":27,"original_position":27,"commit_id":"28d7fa489bb6ea3551c27caec742262cc2fbdd3c","original_commit_id":"28d7fa489bb6ea3551c27caec742262cc2fbdd3c","user":{"login":"rosen-vladimirov","id":8351653,"avatar_url":"https://avatars.githubusercontent.com/u/8351653?v=3","gravatar_id":"","url":"https://api.github.com/users/rosen-vladimirov","html_url":"https://github.com/rosen-vladimirov","followers_url":"https://api.github.com/users/rosen-vladimirov/followers","following_url":"https://api.github.com/users/rosen-vladimirov/following{/other_user}","gists_url":"https://api.github.com/users/rosen-vladimirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rosen-vladimirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosen-vladimirov/subscriptions","organizations_url":"https://api.github.com/users/rosen-vladimirov/orgs","repos_url":"https://api.github.com/users/rosen-vladimirov/repos","events_url":"https://api.github.com/users/rosen-vladimirov/events{/privacy}","received_events_url":"https://api.github.com/users/rosen-vladimirov/received_events","type":"User","site_admin":false},"body":"you can add:\r\n```TypeScript\r\nthis.$logger.trace(`Error while killing NativeScript inspector: ${e.message}`);\r\n```\r\nSo in case there's some strange error on client side, we'll be able to at least see it when `--log trace` is passed.","created_at":"2016-07-26T07:46:45Z","updated_at":"2016-07-26T07:46:45Z","html_url":"https://github.com/NativeScript/nativescript-cli/pull/1939#discussion_r72202599","pull_request_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939","_links":{"self":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments/72202599"},"html":{"href":"https://github.com/NativeScript/nativescript-cli/pull/1939#discussion_r72202599"},"pull_request":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939"}}},"pull_request":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939","id":78305651,"html_url":"https://github.com/NativeScript/nativescript-cli/pull/1939","diff_url":"https://github.com/NativeScript/nativescript-cli/pull/1939.diff","patch_url":"https://github.com/NativeScript/nativescript-cli/pull/1939.patch","issue_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1939","number":1939,"state":"open","locked":false,"title":"Fixed first time debug with livesync","user":{"login":"tzraikov","id":3244426,"avatar_url":"https://avatars.githubusercontent.com/u/3244426?v=3","gravatar_id":"","url":"https://api.github.com/users/tzraikov","html_url":"https://github.com/tzraikov","followers_url":"https://api.github.com/users/tzraikov/followers","following_url":"https://api.github.com/users/tzraikov/following{/other_user}","gists_url":"https://api.github.com/users/tzraikov/gists{/gist_id}","starred_url":"https://api.github.com/users/tzraikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzraikov/subscriptions","organizations_url":"https://api.github.com/users/tzraikov/orgs","repos_url":"https://api.github.com/users/tzraikov/repos","events_url":"https://api.github.com/users/tzraikov/events{/privacy}","received_events_url":"https://api.github.com/users/tzraikov/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-21T12:17:47Z","updated_at":"2016-07-26T07:46:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fbed8ae17fcea8d49168134deed4cd8ff4ba187","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939/commits","review_comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939/comments","review_comment_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1939/comments","statuses_url":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/28d7fa489bb6ea3551c27caec742262cc2fbdd3c","head":{"label":"NativeScript:raikov/fix-debug-livesync","ref":"raikov/fix-debug-livesync","sha":"28d7fa489bb6ea3551c27caec742262cc2fbdd3c","user":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":21347346,"name":"nativescript-cli","full_name":"NativeScript/nativescript-cli","owner":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NativeScript/nativescript-cli","description":"Command-line interface for building NativeScript apps","fork":false,"url":"https://api.github.com/repos/NativeScript/nativescript-cli","forks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/forks","keys_url":"https://api.github.com/repos/NativeScript/nativescript-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/nativescript-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/nativescript-cli/teams","hooks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/events","assignees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/nativescript-cli/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/tags","blobs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/nativescript-cli/languages","stargazers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscription","commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/nativescript-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/nativescript-cli/merges","archive_url":"https://api.github.com/repos/NativeScript/nativescript-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/nativescript-cli/downloads","issues_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/nativescript-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/nativescript-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/nativescript-cli/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/nativescript-cli/releases{/id}","deployments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/deployments","created_at":"2014-06-30T10:21:20Z","updated_at":"2016-07-23T03:52:29Z","pushed_at":"2016-07-26T07:46:22Z","git_url":"git://github.com/NativeScript/nativescript-cli.git","ssh_url":"git@github.com:NativeScript/nativescript-cli.git","clone_url":"https://github.com/NativeScript/nativescript-cli.git","svn_url":"https://github.com/NativeScript/nativescript-cli","homepage":"https://www.npmjs.com/package/nativescript","size":37404,"stargazers_count":403,"watchers_count":403,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"open_issues_count":75,"forks":73,"open_issues":75,"watchers":403,"default_branch":"master"}},"base":{"label":"NativeScript:master","ref":"master","sha":"1960b0c93abda832d64867b9c1ec9806904056ac","user":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":21347346,"name":"nativescript-cli","full_name":"NativeScript/nativescript-cli","owner":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NativeScript/nativescript-cli","description":"Command-line interface for building NativeScript apps","fork":false,"url":"https://api.github.com/repos/NativeScript/nativescript-cli","forks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/forks","keys_url":"https://api.github.com/repos/NativeScript/nativescript-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/nativescript-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/nativescript-cli/teams","hooks_url":"https://api.github.com/repos/NativeScript/nativescript-cli/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/events","assignees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/nativescript-cli/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/tags","blobs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/nativescript-cli/languages","stargazers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/nativescript-cli/subscription","commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/nativescript-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/nativescript-cli/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/nativescript-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/nativescript-cli/merges","archive_url":"https://api.github.com/repos/NativeScript/nativescript-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/nativescript-cli/downloads","issues_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/nativescript-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/nativescript-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/nativescript-cli/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/nativescript-cli/releases{/id}","deployments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/deployments","created_at":"2014-06-30T10:21:20Z","updated_at":"2016-07-23T03:52:29Z","pushed_at":"2016-07-26T07:46:22Z","git_url":"git://github.com/NativeScript/nativescript-cli.git","ssh_url":"git@github.com:NativeScript/nativescript-cli.git","clone_url":"https://github.com/NativeScript/nativescript-cli.git","svn_url":"https://github.com/NativeScript/nativescript-cli","homepage":"https://www.npmjs.com/package/nativescript","size":37404,"stargazers_count":403,"watchers_count":403,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"open_issues_count":75,"forks":73,"open_issues":75,"watchers":403,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939"},"html":{"href":"https://github.com/NativeScript/nativescript-cli/pull/1939"},"issue":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1939"},"comments":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1939/comments"},"review_comments":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939/comments"},"review_comment":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/pulls/1939/commits"},"statuses":{"href":"https://api.github.com/repos/NativeScript/nativescript-cli/statuses/28d7fa489bb6ea3551c27caec742262cc2fbdd3c"}}}}
{"actor":{"display_login":"rosen-vladimirov"}}