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

Can't read from stdin in debugger

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.13.0
    • C/C++/Obj-C++ Support
    • None
    • macOS 10.15.6
      MacBook Pro (16-inch, 2019)
    • 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

            hjk hjk
            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