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

can't (Debug) attach to unstarted application unless introducing some delay

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 5.0.1
    • Debugger
    • None
    • Linux/X11

    Description

      "Debug" menu->Start debugging->Attach to unstarted application

      does not work unless you introduce some delay in the code.

      Here how to reproduce on Linux (Fedora 35 in my case). Compile following code

      #include <stdio.h>
      
      int main()
      {
          printf("hello world\n");
          return 0;
      }
      

      with

      $ gcc -g3 main.c -Wall -Wextra -o hello_world

      then in QtCreator

      "Debug" menu->Start debugging->Attach to unstarted application
      

      then in your computer shell

      ./hello_world
      

      Nothing will happen in QtCreator
      If instead you use the following code, QtCreator debug interface will correctly attach to the process

      #include <stdio.h>
      
      int main()
      {
          sleep(1);
          printf("hello world\n");
          return 0;
      }
      

      Attachments

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

        Activity

          People

            hjk hjk
            germano Germano Massullo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes