Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    Debugging in Preview Mode

    General Discussion
    2
    3
    183
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dick Honing
      Dick Honing last edited by

      I was trying to debug a script in preview mode (Chrome > Inspect) and noticed a whole list of warnings an info's. Any idea what might be wrong? Or are you not supposed to debug in preview mode?

      Screenshot 2020-11-20 at 13.17.03.png

      1 Reply Last reply Reply Quote 0
      • Daniel Mulroy
        Daniel Mulroy last edited by

        I would DEFINITELY not debug in PageBuilder's Preview mode 🙂

        You'll be seeing a lot of PageBuilder and AppDrag specific messages, which will make finding your own code and working on it much more difficult than it should be.

        Each time you 'save' in PageBuilder, however, it saves a full copy of that page in www.yoursite.com/preview/yourpage.html so you can simply open a browser, navigate there, and debug from there. No need to publish.

        Pro tip:
        Due to cloudFlare's caching (according to your own AppDrag caching preferences, 30s by default), you may have to add a random URL parameter to the end of the URL. This causes CloudFlare to think it's potentially a new request, and therefore invalidates the cache.

        Example: www.yoursite.com/preview/yourpage.html?a=b

        Then if you want to make sure you are running the latest code after saving, just add a random character to the end like
        www.yoursite.com/preview/yourpage.html?a=b2
        www.yoursite.com/preview/yourpage.html?a=b21
        www.yoursite.com/preview/yourpage.html?a=b214
        www.yoursite.com/preview/yourpage.html?a=b2146

        etc.

        Cheers

        1 Reply Last reply Reply Quote 1
        • Dick Honing
          Dick Honing last edited by

          @Daniel-Mulroy thanks Daniel! BTW: I found that you if you force reloading the page also works ... Shift-Cmd-R on macOS

          1 Reply Last reply Reply Quote 0
          • First post
            Last post