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. [Solved] QML profiling on embedded device: Debugging has not been enabled

[Solved] QML profiling on embedded device: Debugging has not been enabled

Scheduled Pinned Locked Moved QML and Qt Quick
14 Posts 3 Posters 11.0k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bkamps
    wrote on last edited by
    #1

    Hi all,

    I have some performance issues on parsing / compiling QML files on my embedded device. I have read this tutorial and want to profile my Qt Quick 4.8.3 application "link":http://doc.qt.digia.com/qtcreator-2.5/creator-qml-performance-monitor.html

    I want to run QtCreator on a linux pc for profiling and to do a remote profile session. I don't use QtCreator as IDE but instead I let qmake generate make files for me and use eclipse as IDE (company rule). So I use my makefiles to create the binaries, copy them on my device, start the app and use QtCreator for remote profile connection.

    To enable QML profiling in my application I have added the following to my project's .pro file. According to this post: "link":http://lists.qt.nokia.com/pipermail/qt-qml/2011-May/002599.html

    @
    CONFIG+=declarative_debug
    @

    This is the complete .pro file (example) :

    @
    TRANSLATION = MY_TRANS.ts
    TEMPLATE = app
    TARGET = MY_TARGET
    QT += core
    QT += declarative
    CONFIG += declarative_debug
    INCLUDEPATH += ....
    LIBS...
    HEADERS....
    @

    Ok, so step one is to start the application on my embedded device using the -qmljsdebugger commandline option:

    @
    my_app -qmljsdebugger=port:33456
    @

    The application replies:

    @
    Ignoring "-qmljsdebugger=port:33456". Debugging has not been enabled.
    @

    How to enable debugging in my project? I have seen guides telling how to do this in QtCreator but I only use the .pro file to generate makefiles and build the application by using those makefiles.

    I have build Qt 4.8.3 using the following configure options:

    @
    -opensource -confirm-license -stl -no-qt3support -no-audio-backend -no-phonon-backend -no-phonon -no-webkit -no-javascript-jit -no-openssl -no-nis -no-cups -no-dbus -no-accessibility -nomake examples -nomake demos -nomake docs -no-rpath -no-xmlpatterns -no-multimedia -no-svg -no-javascript-jit -no-scripttools -no-opengl -declarative
    @

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SteveKing
      wrote on last edited by
      #2

      Hi

      Have you got the qmldbg_tcp4.dll plugin available? I've managed to remotely profile a device using WinCE and Qt 4.7.4 and this was the step I missed. Note sure if the plugin is required for 4.8.3 but it might be worth a check.

      Regards,
      Steve

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bkamps
        wrote on last edited by
        #3

        I am using a linux device. But I haven't seen any qml debug shared object files in my Qt lib directory.

        I just copied the build Qt libs + my application to the target and run the application.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SteveKing
          wrote on last edited by
          #4

          The Dll is in plugins/qmltooling on Windows. I'm not sure if Creator builds it or whether it's part of the Qt library.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bkamps
            wrote on last edited by
            #5

            Is this file required on target?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SteveKing
              wrote on last edited by
              #6

              It is on WinCE, but I don't know for Linux.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bkamps
                wrote on last edited by
                #7

                I got a little further. Now Qt logs of my application tells me that the qml debugger is enabled, GREAT! But now I see the following error:

                @
                Remote debugger plugin has not been found
                @

                AArgh... According to the following link I need to link to the qml debug library. It's explained how to do this in QtCreator. Unfortunately I cannot use that to build qt or my app. Anybody knows how to do this (make a .pro file option)?

                "link":http://www.developer.nokia.com/Community/Discussion/showthread.php?230283-Debug-QML-is-impossible

                Ps: I will post monday what steps I had to do to get rid of the "Debugging has not been enabled" message.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bkamps
                  wrote on last edited by
                  #8

                  For Qt 4.8.3 to get rid of the Debugging has not been enabled I added the following options to the .pro file:

                  @
                  DEFINES += QMLJSDEBUGGER
                  DEFINES += QT_DECLARATIVE_DEBUG
                  CONFIG += declarative_debug
                  @

                  Problem now is that the application tells me:

                  @
                  Remote debugger plugin has not been found
                  @

                  Normally you build the debugger plugin from QtCreator and that plugin is linked to the application. Problem is I don't use QtCreator... Anybody knows how to manually build the plugin and link it to my application?

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bkamps
                    wrote on last edited by
                    #9

                    Also fixed the plugin not found message:

                    Copy the following files from qt/usr/plugins/qmltooling to target:your_application/qmltooling:

                    @
                    libqmldbg_tcp.so
                    libqmldbg_inspector.so
                    @

                    Set DISABLE_QML_OPTIMIZER=1 shell enviroment variable.

                    Start your application using the "-qmljsdebugger=port:33456" commandline parameter option.

                    Now I can finally PROFILE my qml files :D

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SteveKing
                      wrote on last edited by
                      #10

                      Nice one, glad you got it sorted out.

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        bkamps
                        wrote on last edited by
                        #11

                        Ok... So next problem..

                        I run my application using the command line parameter qmljsdebugger=port.
                        I connect (on linux pc) QtCreator to my target (Analyze QML Profiler remote).
                        QtCreator and my target connects (I see this in the application log: Connection established).
                        I go to QtCreator analyse window and I see that the profiler is running ( the elapsed time is increased).

                        When my application is done loading all QML files I stop the profiler (press the red stop icon in the analyze window). The profiler stops but no QML events are recorded.. No events, no timeline, no callees and no callers!

                        Anybody has a idea what's going on?

                        Ps: When I do a remote QML debug session I see my main qml window code in QtCreator and I see all set qml properties.

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          bkamps
                          wrote on last edited by
                          #12

                          Problem solved... Had to use a timer to create a window for the profiler to connect. The problem making the connection is slow, so all my qml files were loaded before the connection was made.

                          Also I had to update to QtCreator 2.5 (instead of using 2.4 which was included in Qt 4.8.3)!

                          1 Reply Last reply
                          0
                          • E Offline
                            E Offline
                            ErikH
                            wrote on last edited by
                            #13

                            Hi, I am also trying to profile qml on a remote device, but from a windows xp computer to a winCE device.

                            Steve: I can't find the qmldbg_tcp4.dll you mentioned, and I can't seem to configure QT to build it either for wince. Did you build your dll yourself or did it come with the sdk?

                            (I can build my application to run on my computer aswell and with a similar qt configuration it does build the dll for this target (win32).)

                            1 Reply Last reply
                            0
                            • E Offline
                              E Offline
                              ErikH
                              wrote on last edited by
                              #14

                              I have now been able to compile the dll. Qt was configured only to build it for win32 target.

                              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