How to solve the Linux under QT Creator debug C + + program appears debugging starts & "warning:GDB:Failed to set controlling terminal warning __ Storage

Source: Internet
Author: User

Yesterday the Linux system collapsed and today the Linux system (Ubuntu16.04) was installed. After the QT creator was installed, a simple C + + project was created to test whether the installation was correct and the project defaults to output "Hello world." ", run through, normal output. But there was a warning in debug (though it could also output "Hello world". "): Debugging Starts &" warning:GDB:Failed to set controlling Terminal: ..... Search the internet has not found the right solution, but I am a compulsive disorder, the afternoon to search, look forward to the great God can give a solution. Finally, I saw someone ask this question on a foreign website, and there are some experts who have given the solution (but only in English), and now I write down the solution so that I can check it later.

In the following figure, locate the item in the QT left panel, run it, and then run the "Run in Terminal" under the heading on the right. This causes QT creator to start the program in xterm (default) that is used with GDB, and to make the "& warning:GDB:Failed to set controlling terminal" problem disappear. Which is to run your program at the terminal.


Also, by default, when you start the debugger, the Qt creator is placed in the foreground to hide the started terminal. To stop this behavior, you can go to: tools, options, debugger. In the overview (some versions are general) tab, uncheck the check boxes that refer to the front desk for Qt creator when an application is interrupted.


If you want to change the terminal, you can open the option to the environment. Terminal changes under System. For the Ubuntu/gnome terminal of this machine, set it to/usr/bin/gnome-terminal-x. The parameters in this setting tell the terminal to execute an external command or program.


So far, the problem has been solved.





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.