Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Console.log()

Console.log()

Scheduled Pinned Locked Moved Unsolved General and Desktop
console.loglogdebugqml
10 Posts 4 Posters 15.0k Views
  • 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.
  • A Offline
    A Offline
    Anas A. Ismail
    wrote on 10 Nov 2015, 14:35 last edited by
    #1

    hello everyone,
    when I use Console.log, there's nothing logged to the console, how this could be solved ?
    I can't debug qml code.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Nov 2015, 22:51 last edited by
      #2

      Hi,

      It's console.log("Some message"). Did you make the same typo in your code ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply 11 Nov 2015, 19:37
      0
      • S SGaist
        10 Nov 2015, 22:51

        Hi,

        It's console.log("Some message"). Did you make the same typo in your code ?

        A Offline
        A Offline
        Anas A. Ismail
        wrote on 11 Nov 2015, 19:37 last edited by
        #3

        @SGaist, No I didn't make this, I think it's configuration problem related to qt creator.
        Thanks.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vish
          wrote on 11 Nov 2015, 19:53 last edited by
          #4

          Can you put break point and stop at break point in qml event ??

          Development is possible at any level.

          A 1 Reply Last reply 12 Nov 2015, 00:59
          0
          • M Offline
            M Offline
            mcosta
            wrote on 12 Nov 2015, 00:46 last edited by
            #5

            Hi,

            Which platform? IIRC in Windows you have to define

            CONFIG += console
            

            to see console logs

            Once your problem is solved don't forget to:

            • Mark the thread as SOLVED using the Topic Tool menu
            • Vote up the answer(s) that helped you to solve the issue

            You can embed images using (http://imgur.com/) or (http://postimage.org/)

            A 1 Reply Last reply 12 Nov 2015, 01:07
            0
            • V vish
              11 Nov 2015, 19:53

              Can you put break point and stop at break point in qml event ??

              A Offline
              A Offline
              Anas A. Ismail
              wrote on 12 Nov 2015, 00:59 last edited by
              #6

              @vish I did that, and the debugger does not hit the break point.

              M 1 Reply Last reply 12 Nov 2015, 01:05
              0
              • A Anas A. Ismail
                12 Nov 2015, 00:59

                @vish I did that, and the debugger does not hit the break point.

                M Offline
                M Offline
                mcosta
                wrote on 12 Nov 2015, 01:05 last edited by
                #7

                @Anas-A.-Ismail said:

                @vish I did that, and the debugger does not hit the break point.

                are you sure that code is executed?

                Once your problem is solved don't forget to:

                • Mark the thread as SOLVED using the Topic Tool menu
                • Vote up the answer(s) that helped you to solve the issue

                You can embed images using (http://imgur.com/) or (http://postimage.org/)

                1 Reply Last reply
                0
                • M mcosta
                  12 Nov 2015, 00:46

                  Hi,

                  Which platform? IIRC in Windows you have to define

                  CONFIG += console
                  

                  to see console logs

                  A Offline
                  A Offline
                  Anas A. Ismail
                  wrote on 12 Nov 2015, 01:07 last edited by
                  #8

                  @mcosta I'm working on linux fedora22 distribution.
                  I already did that
                  CONFIF += console qml_debug
                  and the code is executed, and working correctly, I just want to debug to test some value and some performance issues.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Anas A. Ismail
                    wrote on 12 Nov 2015, 02:45 last edited by Anas A. Ismail 11 Dec 2015, 02:45
                    #9

                    I almost attempted all solutions, and I don't know if there're any missing steps.
                    I check enable qml debugging and profiling in build step, and I enabled qml debugging with C++ , but the debugger never hits any breakpoints inside qml code, and I added CONFIF += console qml_debug, I even tried stand alone debuggers.
                    Are there any missing steps or configurations should I make ?

                    V 1 Reply Last reply 12 Nov 2015, 10:07
                    0
                    • A Anas A. Ismail
                      12 Nov 2015, 02:45

                      I almost attempted all solutions, and I don't know if there're any missing steps.
                      I check enable qml debugging and profiling in build step, and I enabled qml debugging with C++ , but the debugger never hits any breakpoints inside qml code, and I added CONFIF += console qml_debug, I even tried stand alone debuggers.
                      Are there any missing steps or configurations should I make ?

                      V Offline
                      V Offline
                      vish
                      wrote on 12 Nov 2015, 10:07 last edited by
                      #10

                      @Anas-A.-Ismail Try to run some simple qml example and put break point and console.log() in event. Its really strange. I don't think we need some kind of config for console.log().

                      Development is possible at any level.

                      1 Reply Last reply
                      0

                      10/10

                      12 Nov 2015, 10:07

                      • Login

                      • Login or register to search.
                      10 out of 10
                      • First post
                        10/10
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved