UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Pointer for those debugging web apps

    Scheduled Pinned Locked Moved App Development
    11 Posts 5 Posters 1.9k Views 2 Watching
    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.
      • V Offline
        vandys
        last edited by

        I of course mostly develop on my desktop Chromium browser, but every now and then I have a problem which only happens on my UBports browser. I found the file:

        .cache/upstart/application-legacy-webbrowser-app-.log

        which is the only place I've been able to find Javascript errors.

        Also note that the browser is very, very clingy to JS source files, a reload of the overall app will often not update the contents of the JS source referenced from the app.

        1 Reply Last reply Reply Quote 1
        • lduboeufL Offline
          lduboeuf
          last edited by lduboeuf

          there is possibility to remotely debug browser webapps, if that helps: link

          V 1 Reply Last reply Reply Quote 1
          • V Offline
            vandys @lduboeuf
            last edited by vandys

            @lduboeuf said in Pointer for those debugging web apps:

            there is possibility to remotely debug browser webapps, if that helps: link

            Nice! I never found that in any of my searches, and that's an awesome ability. It helps very much.

            Note the launch command appears to have become ubuntu-app-launch instead of upstart-app-launch, but otherwise it works as advertised. My default browser is Firefox, which did not play well with this facility. Chromium on Debian works perfectly.

            1 Reply Last reply Reply Quote 0
            • lduboeufL Offline
              lduboeuf
              last edited by

              glad it helps :), might be usefull to write an up to date turorial for ubports community then 🙂

              N 1 Reply Last reply Reply Quote 0
              • N Offline
                NeoTheThird
                last edited by

                <shameless stud>You can also use Logviewer to check the log and conveniently copy it to paste.ubuntu.com for later investigation, if you spot an error while you're on the go.</shameless stud>

                1 Reply Last reply Reply Quote 0
                • N Offline
                  NeoTheThird @lduboeuf
                  last edited by

                  @lduboeuf said in Pointer for those debugging web apps:

                  write an up to date turorial for ubports community then 🙂

                  That would be very much appreciated! Feel free to post something on wiki.ubports.com

                  V 1 Reply Last reply Reply Quote 0
                  • V Offline
                    vandys @NeoTheThird
                    last edited by

                    @NeoTheThird said in Pointer for those debugging web apps:

                    @lduboeuf said in Pointer for those debugging web apps:

                    write an up to date turorial for ubports community then 🙂

                    That would be very much appreciated! Feel free to post something on wiki.ubports.com

                    Have a look at:
                    https://wiki.ubports.com/wiki/Web-Browser-app-debugging
                    and wordsmith it if you can think of nice changes. Thanks!

                    (BTW, not clear how to link it into the rest of the document hierarchy.)

                    1 Reply Last reply Reply Quote 2
                    • FlaF Offline
                      Fla
                      last edited by

                      I'm discovering this thread. The tuto URL changed and now is http://docs.ubports.com/en/latest/appdev/webapp/webdebug.html

                      However, it looks like it doesn't work anymore. I did the 3 steps:

                      • export QTWEBENGINE_REMOTE_DEBUGGING=0.0.0.0:9221
                      • morph-browser --desktop_file_hint=/usr/share/applications/morph-browser.desktop [web_site_url]
                      • Open http://YOUR_UT_IP_ADDRESS:9221 with chromium

                      And it says connection refused.

                      AppLeeA 1 Reply Last reply Reply Quote 0
                      • AppLeeA Offline
                        AppLee @Fla
                        last edited by

                        @Fla
                        IIRC 3 years ago the browser was not yet Morph.
                        So I guess a lot changed since.

                        Maybe someone know the modern way to debug webapps with Morph.
                        It might be better to open a new thread in this regard I guess

                        1 Reply Last reply Reply Quote 0
                        • FlaF Offline
                          Fla
                          last edited by

                          I think the doc has been updated since then, as the command is morph-browser as stated above.

                          AppLeeA 1 Reply Last reply Reply Quote 0
                          • AppLeeA Offline
                            AppLee @Fla
                            last edited by

                            @Fla
                            Oh, right.
                            Sorry I didn't pay enough attention to the command lines.

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