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

Empty Command-Line Argument When Debugging

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.10.0
    • Component/s: Debugger
    • Labels:
      None
    • Environment:
      iMac Pro (2017) running macOS Mojave (10.14.6); QtCreator 4.10.0
    • Platform/s:
      macOS
    • Commits:
      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

        For Gerrit Dashboard: QTCREATORBUG-22975
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            hjk hjk
            Reporter:
            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