fix: tns debug ios --hmr
does not refresh DevTools
#4231
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.
Using
tns debug ios --hmr
leads to incorrect behavior as the application and debug session are not restarted, but the new code is not visible in Chrome DevTools. The problem is that we are not using the latest DevTools, but the one used in Chrome 55. Switching to Bundled tools (included in user's Chrome version) fixes the behavior. In the past we were stuck with the Chrome 55 due to concerns that new Chrome versions may break the behavior.To fix the issue, remove the getChromeDebugUrl from AndroidDeviceDebugService and IosDeviceDebugService, as they are now sharing the same logic, so all of it is in the base class.
PR Checklist
What is the current behavior?
Changes in code during
tns debug ios --hmr
are not visible in Chrome DevTools.What is the new behavior?
Changes in code during
tns debug ios --hmr
are visible in Chrome DevTools and you can continue debugging.Fixes issue #4230