diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2023-04-26 15:05:16 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2023-05-11 07:31:32 +0000 |
commit | 670d36a931cb094aedd6cf97ca4c9b09176e33f7 (patch) | |
tree | 1978f96523182f0c80a5250b1c3fc4342636c64e /doc | |
parent | 3f5d33fe5c2c8e5dfde6e8478102acde6b1b2e57 (diff) | |
download | qt-creator-670d36a931cb094aedd6cf97ca4c9b09176e33f7.tar.gz |
Doc: Don't mention qmake in Qt Quick debugging instructions
The same field is available for both qmake and CMake projects.
Use a screenshot from a CMake project.
Also point to "Preferences > Build & Run > Default Build Properties"
for globally enabling QML debugging and explain what "Use Project Default"
and "Leave at Default" mean.
Fixes: QTCREATORBUG-29089
Change-Id: I3d007d10ca3247dc387eaf21d4d4623d7e90167d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp | bin | 5270 -> 18528 bytes | |||
-rw-r--r-- | doc/qtcreator/src/debugger/qtquick-debugging.qdoc | 63 |
2 files changed, 52 insertions, 11 deletions
diff --git a/doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp b/doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp Binary files differindex 4b38b162f4..0038dc4763 100644 --- a/doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp +++ b/doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp diff --git a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc index 833cbe69c4..c0246fc7b6 100644 --- a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc +++ b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc @@ -38,22 +38,26 @@ The process of setting up debugging for Qt Quick projects depends on the \l{Creating Qt Quick Projects}{type of the project}: Qt Quick UI or Qt Quick Application, and the Qt version used. + + \section2 Debugging Qt Quick UI Projects \endif - To debug Qt Quick UI projects, select the \uicontrol {Enable QML} check box in the - \uicontrol {Debugger Settings} in \uicontrol Projects mode \uicontrol {Run Settings}. + To debug Qt Quick UI projects (.qmlproject), select the + \uicontrol {Enable QML} check box in \uicontrol {Debugger settings} + in \uicontrol Projects mode \uicontrol {Run Settings}. \if defined(qtcreator) + \section2 Debugging Qt Quick Applications + To debug Qt Quick Applications: \list 1 - \li If you use qmake as the build system, make sure that - debugging is enabled in the \uicontrol {Build Settings}, - \uicontrol {QML debugging and profiling} field, either - explicitly for the project or globally by default. + \li To create a build configuration that supports QML debugging, + select \uicontrol {Projects} > \uicontrol {Build} > + \uicontrol {QML debugging and profiling} > \uicontrol Enable. - \image qtcreator-projectpane.png "qmake general build settings pane" + \image qtcreator-build-settings-cmake-configure.webp {Build settings for a CMake project} \note Debugging requires opening a socket at a TCP port, which presents a security risk. Anyone on the Internet could connect @@ -61,9 +65,9 @@ functions. Therefore, you must make sure that the port is properly protected by a firewall. - \li In the \uicontrol {Run Settings}, \uicontrol {Debugger Settings} section, select - the \uicontrol {Enable QML} check box to enable - QML debugging. + \li In \uicontrol {Run Settings} > \uicontrol {Debugger settings}, select + the \uicontrol {Enable QML} check box to enable QML debugging for + running applications. \li Select \uicontrol Build > \uicontrol {Rebuild Project} to clean and rebuild the project. @@ -79,6 +83,43 @@ automatically installed during \QC and Qt installation. Do not delete them if you plan to debug QML applications. + \section2 Using Default Values + + You can enable or disable QML debugging globally in \uicontrol Edit > + \uicontrol Preferences > \uicontrol {Build & Run} > + \uicontrol {Default Build Properties}. + + \image qtcreator-build-settings-default.png "Default Build Properties tab in Build & Run Preferences" + + The value of the \uicontrol {QML debugging} field determines what happens + when creating new build configurations. The values \uicontrol Enable + and \uicontrol Disable explicitly set QML debugging for the new build + configuration to that value, regardless of what type of build + configuration you create. + + \uicontrol {Use Project Default} makes the values depend on the type of + build configuration: \uicontrol Debug, \uicontrol Profile, or + \uicontrol Release. When you use \l {CMake Build Configuration}{CMake} or + \l {qmake Build Configuration}{qmake} as a build system, debug and profile + build configurations have QML debugging enabled. However, release build + configurations do not include QML debugging because the debugging feature + makes applications vulnerable. + + The \uicontrol {Leave at Default} option in \uicontrol {Projects} > + \uicontrol {Build} > \uicontrol {QML debugging and profiling} is needed to keep existing, + already configured CMake build directories intact. Also, it + enables you to import an existing build into \QC without enforced changes, + so that you don't have to worry about a complete rebuild of the project, for + example. Even if you later change the configuration of the build outside of + \QC, it will be kept as you want it. + + There are some known issues in the interaction between the global setting + in \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} > + \uicontrol {Default Build Properties} and the build configuration. + For example, for qmake the global setting only affects build configurations + that are automatically created when enabling a kit. Also, CMake ignores the + global setting. + \section1 Mixed C++/QML Debugging To debug both the C++ and QML parts of your application at the same time, @@ -87,7 +128,7 @@ \uicontrol{Run Settings}. \endif - \image qtquick-debugging-settings.png + \image qtquick-debugging-settings.png {Debugger settings section in Run Settings} \section1 Starting QML Debugging |