-
-
Notifications
You must be signed in to change notification settings - Fork 198
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: Not applicable
- Android Runtime: Not applicable
- iOS Runtime: Not applicable
- Plugin(s): Not applicable
Describe the bug
In {N} 5.1.0 a new feature for debug had been introduced - debug session (and application itself) should not be restarted in case a change is applied in .xml/.css/.html file. What happens in this situation in case you use tns debug <platform> command is that the application is refreshed, but it is not restarted. The debug session is also not restarted, so you can continue the debug in the already opened Chrome DevTools.
However, in NativeScript Sidekick, this does not work in a similar manner - application is not restarted, but the DevTools are refreshed.
To Reproduce
- Open any project in Sidekick.
- Check the
Start Debuggercheckbox. - Click on the
Runbutton. - Once DevTools are opened, change something in
.xml/.css/.htmlfile in your application. - You'll notice app is not restarted on device, but DevTools are refreshed.
Expected behavior
When a change in .xml/.css/.html file is applied, the DevTools should not be refreshed.
Additional context
Sidekick relies on the debuggerAttached event raised by CLI. The problem is that even when the application is not restarted on a change, CLI prints the same Chrome URL and emits debuggerAttached event. Once Sidekick sees it, it refreshes DevTools.
NOTE: This also breaks the behavior of debugging with HMR enabled (currently available only for Android).