Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 5.0.1
-
None
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; }