Skip to content

Debug support

Naveen Chaudhary edited this page Sep 22, 2020 · 1 revision

Debugging viewability for views can be challenging given that there are so many views getting updated with each scroll, to make it easier we have added a debug mode.

What is debug mode?

Debug mode gives you an option to selectively track only the views of interest. All other views will still be tracked but there won't be any callbacks for those views. This will help the devs to have a closer look at the view percentage of selected views.

How to enable debug mode?

To enable debug mode, simply call

#if DEBUG
    NowYou.debug()    // note that this API is available only in debug mode
#endif

As soon as this method is called a floating button will pop up in the bottom right of the screen, clicking on which will open up the debug options.

Debug Options

From the debug options, you can either chose to stop tracking altogether or do selective tracking. To select the views for tracking, enable overlays, and then select the view of interest from the overlays.

Running demo

Debug Demo

Clone this wiki locally