Page 1 of 1

The "debugger" statement - quick way to pause

Posted: Thu Jan 14, 2016 12:09 pm
by leven.steve

For debugging (JS code) I use the Chrome browser and hit F12 (developer tools) as the test app loads during development.

You can set breakpoints in your JS code by navigating on the Sources tab to appery.io/app/view......./app/pages//Controller.js?bust=nnnnnn and then set breakpoints where you want to stop and inspect/trace etc.

But there's a much simpler and easier way to do this!
Just put a line in your function code and if you have the developer tools window open it will pause when it hits that line. Really simple.

debugger;

The yellow warning triangle alerts you to delete or comment out the line later when the app is released.

Image


The "debugger" statement - quick way to pause

Posted: Fri Jan 15, 2016 7:17 am
by Evgene Karachevtsev

Hello Steve,

Thank you for sharing this, sure this will be useful for other users.