Skip to content

fix: tns debug ios --hmr does not refresh DevTools #4231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

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

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.
@rosen-vladimirov rosen-vladimirov added this to the 5.1.1 milestone Dec 13, 2018
@rosen-vladimirov rosen-vladimirov self-assigned this Dec 13, 2018
// This SHA is old and does not support debugging with HMR.
// In case we want to stick with concrete SHA, get it from one of the tags https://chromium.googlesource.com/chromium/src/
// IMPORTANT: When you get the SHA, ensure you are using the `parent` commit, not the actual one.
// Using the actual commit will result in 404 error in the remote serve.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remote server 😸

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, devtools/remote/serve_file - that's why I used remote serve.

@rosen-vladimirov
Copy link
Contributor Author

run ci

1 similar comment
@rosen-vladimirov
Copy link
Contributor Author

run ci

@rosen-vladimirov rosen-vladimirov merged commit f3bae6f into release Dec 14, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/ios-debug-bundled branch December 14, 2018 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants