External QML module debugging
Unsolved
QML and Qt Quick
-
Hello everyone!
I have a generic question about external QML module debugging. I wanted to debug an external qml module in C++ application if possible.
// main.cpp int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(QStringLiteral("qrc:/qml/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) { QCoreApplication::exit(-1); } }, Qt::QueuedConnection); engine.load(url); return app.exec(); }
// main.qml import QtQuick 6.3 import QtQuick.Controls 6.3 import QtQuick.VirtualKeyboard 6.0 import QtQuick.Layouts 6.3 import QtQml 6.0 import MyModule.Utils 1.1 ApplicationWindow { id: applicationWindow width: 1024 height: 600 visible: true title: qsTr("xxx")
I'm able to debug the application and put the brakepoint in
main.qml
as well as inmain.cpp
. But I wanted to debugMyModule.Utils
module. I have compiled it like an external module and set theQML_IMPORT_PATH
. Than opened the file in QtCreator and put the breakepoint there. But nothing happened... .So is it possible to step into external module or only the one way is to use
Console.log()
?Thank you,
Andy