No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to debug in chrome console?

    Framework
    9
    14
    9978
    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.
    • E
      eliashdezr last edited by

      I’m wondering how to debug the javascript inside the Vue component (script tag) on Chrome, does anyone knows?

      1 Reply Last reply Reply Quote 0
      • joaopaulofilho
        joaopaulofilho last edited by

        Try this

        https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd?hl=pt-BR

        Works with vuex too.

        E 1 Reply Last reply Reply Quote 1
        • E
          eliashdezr @joaopaulofilho last edited by

          @joaopaulofilho

          Does that allow to use breakpoints in the javascript source? I don’t see it.

          1 Reply Last reply Reply Quote 1
          • joaopaulofilho
            joaopaulofilho last edited by joaopaulofilho

            I didn’t ever used break points. Don’t know how…

            1 Reply Last reply Reply Quote 0
            • Martin
              Martin last edited by

              In the sources tab you can open the webpack generated files and set breakpoints by clicking on
              the line numbers.

              https://developer.chrome.com/devtools

              0_1480716707991_upload-4152f726-5403-45d7-86ee-19144e95e403

              1 Reply Last reply Reply Quote 1
              • E
                eliashdezr last edited by

                Breakpoints never get hit 😕

                Jon Martin 2 Replies Last reply Reply Quote 0
                • Jon
                  Jon @eliashdezr last edited by Jon

                  @eliashdezr

                  Try adding the command “debugger” in your source code where you’d like a break point to occur. That oughta stop it in its tracks! (A kludge, but maybe better than nothing.)

                  Like you, I’m also having major problems debugging in Chrome (and FireFox) since moving to Vue 2/Quasar 0.8+/Webpack 2 (<— One of those is the culprit!)

                  Under V1, I used to be able to click on the error message in console and link straight to the mapped (i.e. readable) source-code, and step through it. Now, unless the error occurs during the build or I manually insert “debugger” into the source code, I’m usually taken to the Vue internal function that “rehtydrates” the component into JS. Have tinkered & looked for a solution for ever with no luck, so if you find it please let us know!!

                  Also, I had some partial success by selecting “Break on uncaught expection” from Chrome debugger, although it only seems to work sporadically. sigh

                  1 Reply Last reply Reply Quote 0
                  • Martin
                    Martin @eliashdezr last edited by Martin

                    @eliashdezr
                    You are not the only one…
                    https://github.com/webpack/webpack/issues/2145

                    Every now and then, my breakpoints are also skipped. Thankfully still workable for me.
                    OSX 10.11.6, Chrome 54.0.2840.98 (64-bit)

                    1 Reply Last reply Reply Quote 1
                    • E
                      eliashdezr last edited by

                      Thanks for the reply guys.

                      I guess I’ll do the old fashion way (console.logs) or using the debugger command.

                      1 Reply Last reply Reply Quote 0
                      • G
                        Greg last edited by

                        If it could help,

                        For well debuging in chrome or visual studio code on mac osx,
                        I have to replace devtool param in webpack.dev.conf.js
                        #cheap-module-eval-source-map by #eval-source-map

                        Like this :
                        module.exports = merge(baseWebpackConfig, {
                        // eval-source-map is faster for development
                        devtool: ‘#eval-source-map’, // ‘#cheap-module-eval-source-map’,
                        …
                        }

                        Hope 🙂

                        flachica 1 Reply Last reply Reply Quote 0
                        • flachica
                          flachica @Greg last edited by flachica

                          Well I have to use the method that says jon, that is, write ‘debugger’ to stop in the breakpoing. Is there any way to do it without having to modify the code? I see that they fixed the bug in webpack but it still does not work even if I’m changing devtools

                          1 Reply Last reply Reply Quote 0
                          • Hawkeye64
                            Hawkeye64 last edited by

                            Debugging in Chrome always seems to be off a few lines which makes it difficult. I suspect webpack with maps is slightly off for some reason.

                            1 Reply Last reply Reply Quote 0
                            • H
                              harishashim last edited by harishashim

                              Just registered to say +1 . Will follow this thread and give feedback if I ever found a solution.

                              Sharing some not so relevant link:

                              https://developers.google.com/web/tools/chrome-devtools/javascript/

                              1 Reply Last reply Reply Quote 0
                              • S
                                stefan8888 last edited by

                                For anyone wondering how to debug Node.js (i.e. SSR mode) during development (i.e. quasar dev), the solution is quite cool and can be found here:

                                https://stackoverflow.com/questions/11611162/how-to-debug-node-js-app-with-breakpoints-and-everything

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