Qt Unit Test cannot Debug but can Run
-
Hi,
I have a shared library in Qt with qml components, and a test project reference it.
When I try to debug the unit test, it said:@
Debugging starts
&"warning: GDB: Failed to set controlling terminal: Inappropriate ioctl for device\n"
Qml debugging is enabled. Only use this in a safe environment!
Unknown option: '-qmljsdebugger=port:34519,block'New-style logging options:
-o filename,format : Output results to file in the specified format@However I could successfully run the unit test.
What should I do to debug unit test?
Thanks
-
Hi,
I guess the testing framework didn't like the command line parameter passed to your applicaton for QML debugging.
Qt has 2 testing frameworks: "One":http://doc.qt.io/qt-5/qttest-index.html for C++ projects and "another":http://doc.qt.io/qt-5/qtquick-qtquicktest.html for Qt Quick projects.
Maybe you are using the C++ testing framework for QML testing.
-
Thanks for your reply.
I am using C++ for main project.
And the solution is quite simple,
Go to Projects setting, under "Run" tab, uncheck QML debug.
And now can debug the unit test.[quote author="ckakman" date="1420569382"]Hi,
I guess the testing framework didn't like the command line parameter passed to your applicaton for QML debugging.
Qt has 2 testing frameworks: "One":http://doc.qt.io/qt-5/qttest-index.html for C++ projects and "another":http://doc.qt.io/qt-5/qtquick-qtquicktest.html for Qt Quick projects.
Maybe you are using the C++ testing framework for QML testing.[/quote]