Profile Qt Quick applications
You can use the QML Profiler integrated into Qt Creator to profile a Qt Quick application that you run from Visual Studio. With QML Profiler, you can find causes for typical performance problems in your applications, such as slowness and unresponsive, stuttering user interfaces.
One typical cause for such performance problems is executing too much JavaScript in too few frames. All JavaScript must return before the GUI thread can proceed, and frames are delayed or dropped if the GUI thread is not ready. Another typical cause is creating or updating invisible items, which takes time in the GUI thread.
To profile Qt Quick applications:
- In Visual Studio, open a Qt Quick application project.
- In Solution Explorer, right-click the project and select Properties in the context menu.
- Select Configuration Properties > Qt Project Settings.
- In Enable QML Debugging, select Yes.
- Select Debugging.
- In Command arguments, enter:
-qmljsdebugger=port:<number>,block
For more information, see Qt Quick: Starting Applications.
Note: The command arguments conflict with the ones set in Environment by default, so debugging won't work until you remove them.
- Select OK.
- Go to Build, and then select Build Solution to build the application.
- Go to Debug, and then select Start without Debugging (or press Ctrl+F5) to run the application.
- In Qt Creator, go to Analyze, and then select QML Profiler (Attach to Waiting Application).
- In Port, set the same port number as in the command arguments.
- Select OK to start profiling.
- If profiling does not start immediately in QML Profiler, select Enable Profiling to start collecting data.
See also Enable QML debugging, Qt Creator: Profile QML applications, and Qt Creator: Profiling QML applications.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.