Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it support Activating QML/JavaScript Debugger ? #30

Closed
Akise opened this issue Jan 5, 2022 · 4 comments
Closed

Does it support Activating QML/JavaScript Debugger ? #30

Akise opened this issue Jan 5, 2022 · 4 comments

Comments

@Akise
Copy link

Akise commented Jan 5, 2022

I want qtcreator to connect to port 3030 to debug qml code

public class Test extends QQmlApplicationEngine {

    public Test(){
        super();
        this.load(QUrl.fromClassPath("test.qml"));
    }

    public static void main(String[] args) {
        QQmlDebuggingEnabler.startTcpDebugServer(3030, QQmlDebuggingEnabler.StartMode.WaitForClient);  

        QGuiApplication.initialize(args);
        Test test = new Test();
        QGuiApplication.shutdown();
    }
}

@omix
Copy link
Contributor

omix commented Jan 5, 2022

I think, there is an exec missing, isn't it?

QGuiApplication.exec();

Actually, I have no experience with debugging QML code at all. I expect it working in QtJambi like in native C++.

@Akise
Copy link
Author

Akise commented Jan 5, 2022

无标题

@omix
Copy link
Contributor

omix commented Jan 5, 2022

Ok, I checked it. I can clearly state, that it is not possible to debug QML programs of a Java program with the latest version of QtJambi.
QML debugger is simply disabled because it needs #define QT_QML_DEBUG to be defined in C++ native code.
I added a bugfix for the next release of QtJambi where you can then enable QML debugging with a Java flag.

-Dio.qt.enabled-qml-debugging=true 
-qmljsdebugger=port:3030,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation

However, you will have to wait for QtJambi 5.15.4/6.2.2.

@omix omix closed this as completed Jan 5, 2022
@omix
Copy link
Contributor

omix commented Jan 18, 2022

This issue is solved with QtJambi 6.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants