Closed davidovich closed 5 years ago
Additional note: If you use tns run ios --hmr
from a console, it works as expected. So it seems to be the tns debug
command, which is used by the vscode extension that triggers the reload: `[NativeScriptCli] execute: tns --analyticsClient VSCode debug ios --watch --hmr'.
Is it possible to debug an hmr build started with tns run
?
@davidovich,
Currently debug command does not support --hmr
mode but we're working on implementing it. You can track the progress of the feature in this thread https://github.com/NativeScript/nativescript-cli/issues/2992.
Wow that is awesome! Thanks!
Acceptance criteria:
"tnsArgs": [ "--hmr" ]
in launch.json"useLegacyWorkflow": false
in nsconfig.json
"tnsArgs": [ "--hmr", "--debug-brk" ]
, --debug-brk
should force restart of application on each change (disregard hmr flag).
Environment
Using nativescript-vue and vue-loader
Describe the bug When using
--hmr
in the debugger launch options, hmr is activated (I see recompilation and bundle transfered to device messages), the application starts and works, but code changes still trigger an app reload.To Reproduce use the
"tnsArgs": [ "--hmr" ]
option in Launch.json, and Launch on iOS. Make a code change.Expected behavior The app is not restarted, and the code change is reflected in the app.
Additional context The latest vue-cli-template has an older vue-loader which has vue-hot-reload-api pinned at 2.3.0, and contains a
window
reference bug (which shows only when using --hmr). You need to update to"vue-loader": "^15.4.2"
and update dependencies to get vue-hot-reload-api at 2.3.1