I am trying to debug my C++ code in QtCreator (version 4.13.1 based on Qt 5.15.1) which is running on an Ubuntu 18.04 virtual machine hosted on my Windows 10 using VirtualBox. As soon as I start the application in debug mode, I get the error:
The inferior stopped because it received a signal from the operating system.
Signal name: SIGSTOP
I've tried changing the version of QtCreator, version of gdb I'm using to debug and tried with a few different versions of my code. The error only happens when debugging with the "Run in Terminal" option selected in the Project settings. The program runs normally if executed standalone in the gnome-terminal. Any idea for what might be causing this?
To start an application in the debugging mode, after opening a Qt project, you can use one of the following methods: Pressing the F5 button Using the Start Debugging button, right below the usual Run button with a. similar icon, but with a small bug on it Using the main menu entries in the following order: Debug/Start. Debugging/Start Debugging.
Now, when you start debugging, Qt Creator should automatically connect over ssh to localhost as root, start gdbserver and perform debugging. It works for running without debugging too. Perhaps you should set up installation of your program on remote host, but that's a different story and it's done differently for Qmake and QBS.
I recently installed Ubuntu 18.04 LTS, for the Windows Subsystem For Linux (WSL). I installed a large number of packages, including ubuntu-desktop, build-essential, qtcreator and a number of others. QTCreator itself seems to work fine for the most part.
Now, in Qt Creator, go Debug -> Start Debugging -> Attach to Running Debug Server. Fill in the form... the most important is the port and server address. I chose 127.0.0.1 and 2345. You can select break at main to break at the beginning of the program. GDB server doesn't start the program until you connect. Show activity on this post.
You should add the following 2 lines to Debugging Helper Customization:
Tools->Options->Debugger->Locals & Expressions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With