Search code examples
qt-creatorpyside2

Debugging pyside, QML, JS project in Qt-Creator


I try to get started with Qt pyside with QML and JS using Qt-Creator IDE. Since the documentation remains vague about debugging capabilities of Qt-Creator I would like to have confirmed, that my debugging experience is expected behaviour.

  • in .py breakpoints work, but print("some string") doesn't print to application output.
  • in .qml breakpoint's don't work, neither does console.debug("some string") print anything
  • in .js breakpoint's don't work, neither does console.debug("some string") print

Is this: Qt Creator does not support mixed mode debugging ? Is PyCharm more suitable?

System: Python 3.8.2,Pyside2 (installed via pip),Qt Creator 4.13.3 Based on Qt 5.15.2


Solution

  • yes, it need mixed mode debug.I use PyCharm and Qt Creator. You can use PyCharm to show the python log and debug .py , use qt creator to show the js log and debug .qml at the sometime.

    First you need Enable QML , see

    Next run .py on PyCharm and connect qml port on Qt Creator, see

    Final , you can debug .py and .qml

    My System: Python 3.9.7,Pyside6,Qt Creator 7.0.1 Based on Qt 6.2.3