- Qt 6.12
- Qt Qml
- Qt Qml Tooling
- qmlprofiler
- Qt 6.12.0 Reference Documentation

# qmlprofiler

The `qmlprofiler` retrieves QML tracing data from an application. The collected data can then be visualized in Qt Creator.

To profile an application, enable QML debugging.

See the QML Profiler to learn more.

Usage
qmlprofiler [options] executable [parameters...]

### options

Option | Description
--- | ---
`-a, --attach <hostname>` | Attach to an application already running on <hostname>, instead of starting it locally.
`-p, --port <port>` | Connect to the TCP port <port>. The default is 3768.
`-o, --output <file>` | Save tracing data in <file>. By default the data is sent to the standard output.
`--record <on|off>` | If set to 'off', don't immediately start recording data when the QML engine starts, but instead either start the recording interactively or with the JavaScript `console.profile()` function. By default the recording starts immediately.
`--include <feature,...>` | Comma-separated list of features to record. By default all features supported by the QML engine are recorded. If `--include` is specified, only the given features will be recorded. The following features are understood by qmlprofiler: `javascript`, `memory`, `pixmapcache`, `scenegraph`, `animations`, `painting`, `compiling`, `creating`, `binding`, `handlingsignal`, `inputevents`, `debugmessages`, `quick3d`.
`--exclude <feature,...>` | Comma-separated list of features to exclude when recording. By default, all features supported by the QML engine are recorded. See `--include` for the features understood by qmlprofiler.
`--interactive` | Manually control the recording from the command line. The profiler will not terminate itself when the application does so in this case. The following commands are available: `'r', 'record'` Switch recording on or off. `'o [file]', 'output [file]'` Output profiling data to `<file>`. If no `<file>` parameter is given, output to whatever was given with `--output`, or standard output. `'c', 'clear'` Clear profiling data recorded so far from memory. `'f [file]', 'flush [file]'` Stop recording if it is running, then output the data, and finally clear it from memory. `'q', 'quit'` Terminate the target process if started from qmlprofiler, and qmlprofiler itself.
`--verbose` | Print debugging output.
`-h, --help` | Displays help on commandline options.
`--help-all` | Displays help, including generic Qt options.
`-v, --version` | Displays version information.

### Arguments

Argument | Description
--- | ---
executable | The path of the executable file that loads a QML document.
parameters | Arguments of the executable