diff options
Diffstat (limited to 'sources')
| -rw-r--r-- | sources/pyside6/doc/gettingstarted.rst | 4 | ||||
| -rw-r--r-- | sources/pyside6/doc/tools/index.rst | 14 | ||||
| -rw-r--r-- | sources/pyside6/doc/tools/vscode-ext.rst | 73 | ||||
| -rw-r--r-- | sources/pyside6/doc/tutorials/debugging/qml_debugging.rst | 27 |
4 files changed, 117 insertions, 1 deletions
diff --git a/sources/pyside6/doc/gettingstarted.rst b/sources/pyside6/doc/gettingstarted.rst index 9abe6456a..9f4b97f8e 100644 --- a/sources/pyside6/doc/gettingstarted.rst +++ b/sources/pyside6/doc/gettingstarted.rst @@ -282,6 +282,10 @@ Next steps Now that you have use both technologies, you can head to our :ref:`pyside6_examples` and :ref:`pyside6_tutorials` sections. +.. tip:: **Visual Studio Code Users**: If you use VSCode, check out the + :ref:`vscode-ext` which provides project templates, debugging support, + build tasks, and other productivity features for PySide6 development. + .. _faq-section: Frequently Asked Questions diff --git a/sources/pyside6/doc/tools/index.rst b/sources/pyside6/doc/tools/index.rst index 0f6cd03f0..6e3057b35 100644 --- a/sources/pyside6/doc/tools/index.rst +++ b/sources/pyside6/doc/tools/index.rst @@ -163,6 +163,19 @@ PySide Utilities a tool to print out the metatype information in JSON to be used as input for ``qmltyperegistrar``. +IDE Integration +~~~~~~~~~~~~~~~ + +.. grid:: 2 + :gutter: 3 3 4 5 + + .. grid-item-card:: Qt Python VSCode Extension + :link: vscode-ext + :link-type: ref + + Visual Studio Code extension for PySide6 development with project + templates, debugging, build tasks, and more. + Deployment ~~~~~~~~~~ @@ -237,3 +250,4 @@ Qt Quick 3D pyside6-balsamui pyside6-qmlimportscanner pyside6-qsb + vscode-ext diff --git a/sources/pyside6/doc/tools/vscode-ext.rst b/sources/pyside6/doc/tools/vscode-ext.rst new file mode 100644 index 000000000..a0f677367 --- /dev/null +++ b/sources/pyside6/doc/tools/vscode-ext.rst @@ -0,0 +1,73 @@ +.. _vscode-ext: + +Qt Python VSCode Extension +************************** + +The `Qt Python extension`_ for Visual Studio Code is a comprehensive development tool +that enhances your PySide6 development workflow with integrated debugging, project +templates, and build tasks. + +Installation +============ + +Install the extension from the Visual Studio Code Marketplace: + +1. Open VSCode +2. Go to the Extensions view +3. Search for "Qt Python" +4. Click Install on the extension published by **The Qt Company** + +Alternatively, install from the command line: + +.. code-block:: bash + + code --install-extension TheQtCompany.qt-python + +Features +======== + +Project Creation +---------------- + +Create new PySide6 projects using templates: + +1. Open the Command Palette +2. Type and select **Qt: Create a new Project or file** +3. Choose from available templates: + + * **Python QtQuick Application** - Creates a Qt Quick/QML project structure + * **Python QtWidgets Application** - Creates a Qt Widgets project structure + +PySide6 Installation +-------------------- + +Quickly install PySide6 in your current Python environment: + +1. Open the Command Palette +2. Type and select **Qt-Python: Install PySide6** + +Build Tasks +----------- + +The extension provides PySide6-specific tasks accessible via **Tasks: Run Task**: + +* **PySide: build** - Build your PySide6 project (compiles UI files, resources, etc.) +* **PySide: run** - Run your PySide6 application +* **PySide: clean** - Clean build artifacts +* **PySide: deploy** - Deploy your application using pyside6-deploy + +Debugging +--------- + +The extension provides debugging capabilities for PySide6 applications with support +for both Python and QML code. See :ref:`tutorial_qml_debugging` for detailed information +on debugging Qt Quick applications with mixed Python/QML debugging. + +Learn More +========== + +For detailed documentation, feature updates, and usage instructions, visit the +`Qt Python extension marketplace page`_. + +.. _`Qt Python extension`: https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt-python +.. _`Qt Python extension marketplace page`: https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt-python 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 |
