Debugging PySide with Qt Creator (Linux)¶
As opposed to VSCode, presently Qt Creator does not support mixed mode debugging. However, we can debug the C++ implementation of the corresponding Python PySide code. Unlike VSCode, Qt Creator provides a very easy interface to attach GDB to the Python interpreter. It saves you from doing all the extra configuration steps, that have to be done with VSCode.
Here are the steps:
Set a breakpoint on the C++ code.
Go to Projects -> Run -> Run Configuration -> Add. This is going to open a new window shown below.
3. Click on Custom Executable and Create a new configuration. Feed in the details like shown below.
Debug -> Start Debugging -> Start Debugging Without Deployment.
You will now hit you breakpoint and can start debugging your code.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.