Ubuntu under code blocks unable to run and debug solution

Source: Internet
Author: User

The first two days to try to use Vim+gcc+gdb to write C language, but for me such a novice is too painful, not to, to the IDE, find a half-day, chose the code blocks this is the most used by everyone. But when it's running:

Flash past, Debug time also catch no breakpoint, also does not display the console, the internet looked for a bit, there are currently several solutions:

(1) First, all the paths cannot have Chinese and cannot have spaces.

(2) Second, the program to be debugged must be in a project, that is, create a new project, add the source file into the project to debug.

(3) Furthermore, you need to adjust the style of the console: Settings->environment, the bottom treminal to launch console program: Gnome-terminal-t $TITLE-X.

(4) In addition, you need to have the-G option to ensure that the debug condition: Project->build options, the bottom-G option to add (preferably-wall also added).

(5) Also, if the above does not solve the problem, you can also switch the Debug window: Project->properties->build Target, in the Type drop-down bar to try the GUI application or console Application.

This is an online solution, but it does not solve the problem I am having:

What I came up with was: warning:GDB:Failed to set controlling terminal:operation not permitted

So I found in a foreign friend's post, you can change the information in (3) to: gnome-terminal--disable-factory--hide-menubar-t $TITLE-X

This solves my problem, but the pop-up console does not have the information, but in the original startup code blocks console appeared debugging information, can also be debug, is a preliminary solution to my problem.

Ubuntu under code blocks unable to run and debug solution

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.