diff options
| author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2025-11-27 12:53:37 +0100 |
|---|---|---|
| committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2025-11-28 10:37:42 +0000 |
| commit | 2eb8acf228fefb58020168a6d03b6bd486e9378d (patch) | |
| tree | 21b81ec6daa816896a84bd66f8f23dc1ce600aea /sources/pyside6/doc/tutorials/debugging | |
| parent | b70ba3daad3c4375f777a16e3e42b1c73387cd1c (diff) | |
- Docs for the `Qt Python` extension for Visual Studio Code
and its features for PySide6 development.
Pick-to: 6.10
Change-Id: I9dfc80b8dab651d3615fcdf4878c674222a74dee
Reviewed-by: Ben Cho <ben.cho@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/doc/tutorials/debugging')
| -rw-r--r-- | sources/pyside6/doc/tutorials/debugging/qml_debugging.rst | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sources/pyside6/doc/tutorials/debugging/qml_debugging.rst b/sources/pyside6/doc/tutorials/debugging/qml_debugging.rst index bf84fecc7..33578d165 100644 --- a/sources/pyside6/doc/tutorials/debugging/qml_debugging.rst +++ b/sources/pyside6/doc/tutorials/debugging/qml_debugging.rst @@ -1,8 +1,10 @@ .. _tutorial_qml_debugging: +Mixed mode Debugging of PySide6 QML Applications +************************************************ Using Qt Creator's QML Debugger for a PySide6 QML Application -************************************************************* +============================================================= Besides the C++ debugger, *Qt Creator* provides a `QML debugger`_ which lets you inspect JavaScript code. It works by connecting to a socket server run by the @@ -31,5 +33,28 @@ For instructions on how to use the QML debugger, see .. note:: The code should be removed or disabled when shipping the application as it poses a security risk. +Using the Qt Python VSCode Extension +==================================== + +The `Qt Python extension`_ for Visual Studio Code provides an easier way to debug +PySide6 QML applications with mixed-mode debugging support for both Python and QML. +The extension comes with several preset launch configurations that enable seamless +debugging without manual setup: + +- ``Qt: PySide: Launch`` - Launch and debug PySide6 applications +- ``Qt: PySide: Launch with QML debugger`` - Launch PySide6 applications with QML debugging enabled +- ``Qt: QML: Attach by port`` - Attach the QML debugger to a running application by port number + +With these configurations, you can set breakpoints in both your Python code and QML +files, inspect variables, and step through code execution across the Python-QML boundary. +For mixed Python and QML debugging, you can use a compound configuration that combines +``Qt: PySide: Launch with QML debugger`` and ``Qt: QML: Attach by port`` to debug both +layers simultaneously. + +For detailed instructions on how to debug PySide6 applications using the Qt Python +extension, see `Debugging Qt for Python Applications in VSCode`_. + .. _`QML debugger`: https://doc.qt.io/qtcreator/creator-debugging-qml.html .. _`Debugging a Qt Quick Example Application`: https://doc.qt.io/qtcreator/creator-qml-debugging-example.html +.. _`Qt Python extension`: https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt-python +.. _`Debugging Qt for Python Applications in VSCode`: https://doc-snapshots.qt.io/vscodeext-dev/vscodeext-how-debug-apps-python.html |
