Skip to content
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

Debug on Android fails when stopped on breakpoint and change in .xml/.css/.html is applied #1243

Closed
KristianDD opened this issue Jan 4, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@KristianDD
Copy link
Contributor

KristianDD commented Jan 4, 2019

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.1.0
  • Cross-platform modules: 5.1.0
  • Android Runtime: 5.1.0

Describe the bug

If tns debug android command is executed and a breakpoint is hit, any sync operation will cause the command to exit with unsuccessful sync operation.

To Reproduce

  1. tns debug android
    2, Modify an xml file

Expected behavior
The sync should complete successfully and changes will be present at least after the continue button is hit.

Additional context

It seems that executing the livesync.js file here blocks the sync thread and the CLI doesn't receive the status report which is sent here until the breakpoint is released. The issue is that the CLI has a limit on how much time to wait for the compleation of the task.

We can try using some inspector api to evaluate the content of the livesync.js file (seems that the ios-runtime uses similar approach). For example this api .

As a last resort we can extract the execution of the script in a separate thread and if the thread is alive we don't create new one. This way only one execution of the script will happen, even if we had more than one livesync.

Related to: NativeScript/nativescript-cli#4227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants