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()
Forum Update on Monday, May 27th 2025

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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • SGaistS SGaist

        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 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 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
          0
          • M Offline
            M Offline
            mcosta
            wrote on 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
            0
            • V vish

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

              A Offline
              A Offline
              Anas A. Ismail
              wrote on last edited by
              #6

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

              M 1 Reply Last reply
              0
              • A Anas A. Ismail

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

                M Offline
                M Offline
                mcosta
                wrote on 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

                  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 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 last edited by Anas A. Ismail
                    #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
                    0
                    • A Anas A. Ismail

                      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 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

                      • Login

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