// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-run-settings-valgrind.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-analyze

    \title Specify Valgrind settings for a project

    To specify settings for running applications on the \l {Kits}{Run device} that
    you select for a kit, go to \uicontrol Projects > \uicontrol {Run Settings}.

    With \l{Valgrind's Tool Suite}, you can detect memory leaks and profile
    function execution.

    To specify Valgrind settings for the current project:

    \list 1

        \li In the \uicontrol {Valgrind Settings} section, select \uicontrol Custom.

        \li Specify Valgrind settings for the project.

            \image {qtcreator-analyzer-settings.png} {Valgrind Settings section in Run Settings}

        \li In \uicontrol {Valgrind executable}, specify the path to the
            Valgrind executable.

        \li In \uicontrol {Valgrind arguments}, specify additional arguments
            for Valgrind.

        \li In \uicontrol {Detect self-modifying code}, select whether to
            detect self-modifying code and where to detect it: only on stack,
            everywhere, or everywhere except in file-backend mappings.

    \endlist

    Select \uicontrol {Restore Global} to revert to the global settings.

    To specify global Valgrind settings, select \preferences >
    \uicontrol Analyzer.

    \sa {Detect memory leaks with Memcheck}, {Profile function execution},
    {Run Valgrind tools on external applications}, {Configuring Projects},
    {Valgrind Callgrind}, {Valgrind Memcheck}
*/
