Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22975

Empty Command-Line Argument When Debugging

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.10.0
    • Debugger
    • None
    • iMac Pro (2017) running macOS Mojave (10.14.6); QtCreator 4.10.0
    • macOS
    • 54e3d06c5e175d86c634b67a0504af6b1e78374f (qt-creator/qt-creator/4.10)

    Description

      I recently upgraded from QtCreator 4.9.1 to QtCreator 4.10.0. When debugging the attached test code from within QtCreator 4.10.0, argc = 2 and argv[1] = "". But when simply running the program, argc = 1.

      As a side-effect of the program receiving an empty argv argument, QCommandLineParser's positionalArguments method adds an empty string to the returned list.

      The attached test code will write "arg: " to the console in a debug session, but write no output when run normally.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            craig_kaufman Craig Kaufman
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes