Skip to content

Support LiveSync Debugging #70

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

Closed
tjvantoll opened this issue Sep 8, 2016 · 7 comments
Closed

Support LiveSync Debugging #70

tjvantoll opened this issue Sep 8, 2016 · 7 comments

Comments

@tjvantoll
Copy link

The NativeScript CLI now supports LiveSync debugging through tns debug ios|android --watch, however, that same functionality does not appear to be available through Visual Studio Code. As soon as I perform one LiveSync the debugger no longer works as expected.

@blagoev
Copy link
Contributor

blagoev commented Sep 8, 2016

thanks, @tjvantoll.

We have plans on making this happen in VSCode but it requires some synced dancing between vscode + debug adapter + client app that will take time.

Right now you can rely on the fast Sync option to manually push the changes to your app directly from within VSCode. (without starting livesync on a console window). This will push only the changed file and will restart the app with debugger attached.

@blagoev
Copy link
Contributor

blagoev commented Sep 8, 2016

This option should be available when you add a new launch.json to your project. Make sure you recreate this file on existing projects.

@tjvantoll
Copy link
Author

Hey @blagoev,

I see the new “Sync” options, but I’m confused about what the workflow is supposed to be. When I run “Sync” the debugger starts as expected, but it does not setup a watcher. So if I want to see my changes I have to go to a terminal and run livesync manually, which kills the debugger.

@blagoev
Copy link
Contributor

blagoev commented Sep 9, 2016

the workflow is manually clicking that option when you make a change. It is equivalent of running livesync (w/o watch) + debug from a console.

The idea is that the user knows when to do a sync run or debug run. Sync does not rebuild so if you change a AndroidManifest.xml for example you need full debug run (which will do rebuild) and Sync is only for js/xml/css or other changes that do not require rebuild/repackage.

@tjvantoll
Copy link
Author

@blagoev Ok thanks, that does make sense. Is the plan to change the Sync open to also watch so that the manual step is no longer necessary?

@blagoev
Copy link
Contributor

blagoev commented Sep 9, 2016

yep I believe it is

@ivanbuhov
Copy link
Contributor

I am closing this in favour of #78

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

No branches or pull requests

3 participants