-
-
Notifications
You must be signed in to change notification settings - Fork 140
Description
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
tns debug android
2, Modify anxml
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