Tag: Debugging

  • Find an element which is adding a horizontal sliding bar to the page

    This is the cool article which explains how to troubleshoot: https://css-tricks.com/findingfixing-unintended-body-overflow/

    Or you may use the following code and add it to the Console (Developer Tools).

    var all = document.getElementsByTagName(“*”), i = 0, rect, docWidth = document.documentElement.offsetWidth;
    for (; i < all.length; i++) {
        rect = all[i].getBoundingClientRect();
        if (rect.right > docWidth || rect.left < 0){
            console.log(all[i]);
        }
    }
  • Debugging chrome on iOS

    For javaScript issues you need to open new tab in chrome ( chrome://inspect ) and you’ll get javascript console logs for all open windows.

    Or you can install: https://github.com/RemoteDebug/remotedebug-ios-webkit-adapter.