-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enable QML debugging and profiling in debug builds #3999
Conversation
The doc says that enabling QML debugging is a security risk so we might want to reflect that in the build output. |
What is on a risk? It is probably the same when adding debug information to the binary. But anyway, how about adding a cmake status message, that mentions the risk.
This is printed a qDebug in 5.12 and from 5.13 to street. |
I'm not sure. AFAIK you can puppeteer the entire application through an unprotected TCP socket. So you can change everything in the QML engine from the outside. So I guess the risk is comparable to being able to attach a gdb to a remote process?
Yes, thats what I'm advocating for.
I fear this is not enough. Its a single line behind lots of other log messages and maintainers might only compile the application and won't get to see it running. So I'd like to add a message during compile time that mentions the risk there as well. |
Ah ok, this opens a network port, that's the risk. |
Yes, that makes sense. The message should mention the network port. |
Allows builds to be profiled and debugged by external applications such as VS and Qt Creator. See https://doc.qt.io/qt-5/qtquick-debugging.html
54341cb
to
ab1419a
Compare
Included a message. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
@Holzhaus does it work for you?
It still work btw. |
Thanks. Unfortunately, this doesn't work for me:
https://doc.qt.io/qt-5/qtquick-debugging.html#starting-applications Or how is this supposed to be used? |
Ah, it actually works (I guess? At least I can see some variables in Qt Creator after attaching to that port) . But the message is confusing. I think this needs to be fixed in the command line arg parser. |
Seems to be the case. It occurs to me as well, but attaching with Qt Creator works. I can inspect the Component tree and do some profiling. If you don't have QtCreator installed, afaik there should be a |
Merge? Or should I take care of the Commandline parser first? |
The issue seems to be that we're parsing the commandline args at the wrong time. We're parsing them in main while we should rather parse them in the QApplication subclass (so |
Allows builds to be profiled and debugged by external applications
such as VS and Qt Creator.
See https://doc.qt.io/qt-5/qtquick-debugging.html