Closed VladimirAmiorkov closed 5 years ago
Workaround is to manually set the debugger in the code:
debugger;
Hi @VladimirAmiorkov
Thanks for the detailed description.
This issue should be reproducible only on very slow devices.
When a script file is loaded for the first time, it has to be parsed
and the Runtime sends a script parsed
message through the Chrome protocol. Once this message is received, the client (Chrome Dev Tools or Visual Studio Code) sets the specified breakpoints. If the app is running on a slow device, the script parsing is slower than the page load and the breakpoint is skipped on the first navigation.
In order to get the breakpoints during page navigation working, you could use hardcoded debugger;
statements in your code, run on a faster device or run your app with --bundle
which will bundle all of your pages in bundle.js
and they will be parsed together during the app start.
Environment
Describe the bug When I place a breakpoint in an event that is consider to be raised very quickly like the
onLoaded
event of aPage
, that breakpoint is not hit if this is the first navigation to thatPage
in the app's lifecycle. After that if you go back to the previousPage
and navigate again to the other one the breakpoint is hit correctly.To Reproduce Using the nativescript-ui-listview demo application that can be found here simply add a breakpoint here, start the app and navigate to the "Getting Started" example.
Expected behavior Breakpoints are hit correctly no matter where they are placed in the app's code.
Sample project Using the nativescript-ui-listview demo application that can be found [here]