GDB under QtCreator on WSL/Ubuntu 18.04 does not start properly
-
wrote on 18 Mar 2020, 12:17 last edited by
This happens when using QtCreator to debug a WSL program on Ubuntu 18.04: Start debugging, the program seems to start, GDB is launched, but either GDB doesn't seem to fully attach to the program, or QtCreator can't communicate with it. The QtCreator console is unable to interrupt the process. Quitting QtCreator leaves the debugger and the program hung.
A simple console C++ application without Qt created by QtCreator's wizard for creating a new project demonstrates the issue.
I've verified the same behavior on a number of different Windows 10 computers hosting WSL/Ubuntu 18.04. Windows is version 1909, WSL 1.
The program can be debugged in a standalone GDB, or under Emacs GDB mode with no issues.
Matt
-
This happens when using QtCreator to debug a WSL program on Ubuntu 18.04: Start debugging, the program seems to start, GDB is launched, but either GDB doesn't seem to fully attach to the program, or QtCreator can't communicate with it. The QtCreator console is unable to interrupt the process. Quitting QtCreator leaves the debugger and the program hung.
A simple console C++ application without Qt created by QtCreator's wizard for creating a new project demonstrates the issue.
I've verified the same behavior on a number of different Windows 10 computers hosting WSL/Ubuntu 18.04. Windows is version 1909, WSL 1.
The program can be debugged in a standalone GDB, or under Emacs GDB mode with no issues.
Matt
@mlperini I would bring this to the developers mailing list or Qt Bug Tracker as I don't think many people use WSL already with Qt/QtCreator.
-
wrote on 21 Apr 2020, 18:23 last edited by jcm69
Hi,
same here. I don't quit qtcreator, I hit Debug -> abort one or two times and after a few second a window appears saying that gdb is not responding and you have the possibility to click on a "stop debugging" button that works.
I can see a message is the xterm where I launched qtcreator saying :"The command \"/mnt/c/Users/.../src\" could not be started."
which is true since this is a directory. ;) May this wrong path is given to gdb instead of the path to the executable ?
HTH,
jc