Fix livesync + debug on iOS Simulator #3334
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
tns debug ios
is used, each change of application's code will trigger restart of app and Chrome DevTools will be disconnected. CLI prints the "new" URL and in case you copy it and paste it immediately in the browser, you'll receive empty DevTools. The problem is that the URL is printed before application is launched successfully on simulator.In order to resolve this issue, try connection on port 18181 - the connection will be successfull only when the application is running. Wait 10 seconds to connect and throw error in case we are unable to connect for this time.
Also fix incorrect behavior of connectionError event - the thrown error should contain the deviceIdentifier, but it was missing.
NOTE: Merge after telerik/mobile-cli-lib#1041