Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Debugging QML/C++ application in Qt Creator

Debugging QML/C++ application in Qt Creator

Scheduled Pinned Locked Moved QML and Qt Quick
19 Posts 5 Posters 25.7k 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.
  • G Offline
    G Offline
    gustavo
    wrote on last edited by
    #5

    Sorry for the late reply! This time I didn't receive an email notification, so I thought anybody had answered.

    My .pro file didn't have such a line (commented or not) when it was created by Qt Creator, but I've found somewhere a reference to it, and then I put it there. But the problem persists, and I'm sure there's only one instance of the application running.

    The only message shown in the process of starting the debbuger (apart from that of the popup) is: "QML Debugger connecting..." in the debugger view. My app doesn't output anything specifically related to the debug process, but it outputs the following when it starts (on Linux; I'm not with my Mac right now to test it on there):

    (6685) KSharedDataCache::Private::mapSharedMemory: Opening cache "/var/tmp/kdecache-gustavo/icon-cache.kcache" page size is 4096
    (6685) KSharedDataCache::Private::mapSharedMemory: Attached to cache, determining if it must be initialized
    (6685) KSharedDataCache::Private::mapSharedMemory: Cache fully initialized -- attached to memory mapping
    (6685) KSharedDataCache::Private::mapSharedMemory: 4329472 bytes available out of 10485760
    QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Arquivo ou diretório não encontrado
    QFileSystemWatcher: failed to add paths: /home/gustavo/.config/ibus/bus
    Bus::open: Can not get ibus-daemon's address.
    IBusInputContext::createInputContext: no connection to ibus-daemon

    Is this somehow related to the problem?

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #6

      ok finally got a chance to try this and got this error:
      @
      Project WARNING: This library requires Qt 4.7.1 or newer.
      Project WARNING:
      Project WARNING:
      Project ERROR: Qt version 4.7.0 too old for QmlJS Debugging. Aborting.
      @

      have to get 4.7.1 ... ummm wasn't aware of no support on 4.7.0

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gustavo
        wrote on last edited by
        #7

        Hmmm... no suport for qml debugging on 4.7.0? This explains why I'm not being able to use the debugger. :)

        Chetan, you are using 4.7.0, right?
        So, can anyone confirm this is working only on more recent versions of Qt? I didn't find this information in any doc I've read so far.

        Thanks!

        1 Reply Last reply
        0
        • ? This user is from outside of this forum
          ? This user is from outside of this forum
          Guest
          wrote on last edited by
          #8

          bq.
          Chetan, you are using 4.7.0, right?

          yes as of now I'm on 4.7.0, but will try to get 4.7.1 from git today and revert if debugging works with that

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gustavo
            wrote on last edited by
            #9

            Ok
            Thanks

            1 Reply Last reply
            0
            • ? This user is from outside of this forum
              ? This user is from outside of this forum
              Guest
              wrote on last edited by
              #10

              I'm having serious issues trying to download the 4.7.1 from repository :( ... unsuccessful past 2 days, keeps disconnecting or timing out and just aborts. will try again over weekend.

              meanwhile, saw "this video ":http://www.youtube.com/watch?v=LD360rT7zkA&fmt=22 on youtube

              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on last edited by
                #11

                finally got to the master branch without issues, the qml observer works fine as shown in the youtube video but not able to debug qml apps properly ... still trying further

                1 Reply Last reply
                0
                • ? This user is from outside of this forum
                  ? This user is from outside of this forum
                  Guest
                  wrote on last edited by
                  #12

                  I guess we have to wait for more stable release of this feature. Keep getting this error when I try to debug qml ...

                  Maybe some Troll can throw more light on this dump from the debugger log...

                  @

                  &"warning: QDeclarativeDebugServer: Connection established\n"
                  QDeclarativeDebugServer: Connection established

                  &"\n"
                  sQmlJSDebugger: Connected to debug service 'QDeclarativeObserverMode'.
                  sQmlJSDebugger: Connected to debug service 'JSDebugger'.
                  sQmlJSDebugger: connected.
                  s
                  sQmlJSDebugger: Not connected to debug service 'JSDebugger'.
                  sQML Debugger connected.
                  dNOTE: ENGINE RUN AND INFERIOR RUN OK
                  dState changed from InferiorRunOk(10) to InferiorRunRequested(9).
                  dState changed BY FORCE from InferiorRunOk(10) to InferiorRunOk(10).
                  dNOTE: INFERIOR RUN OK
                  dState changed from InferiorRunRequested(9) to InferiorRunOk(10).
                  dState changed BY FORCE from InferiorRunOk(10) to InferiorRunOk(10).
                  eQmlJSDebugger: Error: (-1) Unknown error
                  sQmlJSDebugger: connected.
                  @

                  Also found this strange message:
                  @
                  set substitute-path C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt C:/qt/chetan-chetans-qt-master/chetans-qt
                  set substitute-path C:/iwmake/build_mingw_opensource C:/qt/chetan-chetans-qt-master/chetans-qt
                  @
                  Code has some hardcoded paths to qt-greenhouse :)

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    gustavo
                    wrote on last edited by
                    #13

                    Sadly, as it´s a very usefull feature...

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      gustavo
                      wrote on last edited by
                      #14

                      I will try to do the same at home later, on my Linux machine, to see if I get a better result.

                      1 Reply Last reply
                      0
                      • kkoehneK Offline
                        kkoehneK Offline
                        kkoehne
                        Moderators
                        wrote on last edited by
                        #15

                        @chetankjain: I'm pretty sure QtCreator doesn't contain any references to qt-greenhouse :)

                        Anyhow, the debugger log looks indeed strange: What happens is that a connection to the client program was established, and both services (QDeclarativeObserverMode, JSDebugger) are found. However, afterwards the JSDebugger becomes unavailable again. This could happen e.g. because the QmlEngine on the client side is destroyed ... Can you tell exactly with which QtCreator version / Qt branch this happened? Or could you try with finalized 4.7.1 and latest QtCreator 2.1 ? Preferably as a bug report at bugreports.qt.nokia.com. Thanks in advance!

                        Director R&D, The Qt Company

                        1 Reply Last reply
                        0
                        • ? This user is from outside of this forum
                          ? This user is from outside of this forum
                          Guest
                          wrote on last edited by
                          #16

                          [quote author="kkoehne" date="1290067334"]@chetankjain: I'm pretty sure QtCreator doesn't contain any references to qt-greenhouse :)

                          Anyhow, the debugger log looks indeed strange: What happens is that a connection to the client program was established, and both services (QDeclarativeObserverMode, JSDebugger) are found. However, afterwards the JSDebugger becomes unavailable again. This could happen e.g. because the QmlEngine on the client side is destroyed ... Can you tell exactly with which QtCreator version / Qt branch this happened? Or could you try with finalized 4.7.1 and latest QtCreator 2.1 ? Preferably as a bug report at bugreports.qt.nokia.com. Thanks in advance!
                          [/quote]

                          Hi Koehne, thanks for the reply.
                          yes the latest creator doesn't have any references to qt-greenhouse, its cleaned up now :)

                          I tried on the final Qt 4.7.1 and Creator 2.1 itself. I'll log a bug

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            jpasion
                            wrote on last edited by
                            #17

                            Hello,

                            I logged a bug about the original post.
                            http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3148

                            I receive a similar error (same error about connecting to server, but not the same message). I can replicate the error in two environments.

                            1 Reply Last reply
                            0
                            • ? This user is from outside of this forum
                              ? This user is from outside of this forum
                              Guest
                              wrote on last edited by
                              #18

                              thanks jpasion, will update my comments there too

                              1 Reply Last reply
                              0
                              • C Offline
                                C Offline
                                changsheng230
                                wrote on last edited by
                                #19

                                Good posts.Looking forward to QML debugger problems fixed.

                                Chang Sheng
                                常升

                                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