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