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

Can't read from stdin in debugger

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.13.0
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      macOS 10.15.6
      MacBook Pro (16-inch, 2019)
    • Platform/s:
      macOS

      Description

      just updated QT Creator to 4.13.0 and now I can't read from stdin while I'm in the debugger.

      A few details...

      • I am writing C++, but using C stdio library. (for historical reasons)
      • I am using qt 15.5.0 toolchain in c++11 mode.
      • I am using the 'Run from Terminal' debugger option.

      Problem: Type as I might, when my code goes into fgets it never returns. (See sample program.) 
      #include <stdio.h>

      int main()

          char buf[1024];
          if (fgets(buf,1024, stdin)) // In debugger, this call never returns!
         

      {         fprintf(stderr, "%s", buf);     }

          return 0;

      Note: When I run this outside of the debugger - no problems.
       

        Attachments

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

          Activity

            People

            Assignee:
            hjk hjk
            Reporter:
            davidhvernon David Vernon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes