Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Unit Test cannot Debug but can Run
Qt 6.11 is out! See what's new in the release blog

Qt Unit Test cannot Debug but can Run

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ckakman
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        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]

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved