Using Valgrind Code Analysis Tools
Qt Creator integrates Valgrind code analysis tools for detecting memory leaks and profiling function execution. You must download and install them separately to use them from Qt Creator.
You can run the Valgrind tools either locally on the development host or remotely on another host. You can use them to analyze both applications for which you set up a project in Qt Creator and applications for which you do not have a project.
Valgrind tools are supported locally only on Linux and macOS. However, according to Valgrind.org, support on macOS 10.8 and 10.9 is experimental and mostly broken. You can run the tools on a remote Linux machine or device from any development host.
To run the Valgrind tools to analyze an application for which you have a project, open the project in Qt Creator and select the kit to run the project. The kit specifies whether the Valgrind tools are run locally or remotely.
For more information about analyzing applications for which you do not have a project, see Running Valgrind Tools on External Applications.
To set preferences for the Valgrind tools, select Edit > Preferences > Analyzer. You can override the general settings for each project in the Run Settings for the project.
The following sections describe how to use the Valgrind tools:
© 2022 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.