Your description is a bit confusing...
To be honest i don't understand anything you are writing. So lets try to clear things up a bit:
NOTE: I have no idea how big your understanding of compiler and debugger is, so the following list is written as easy as possible. Don't be offended by the noobish writing, but you have a problem and we are trying to fix it. I request you to follow the steps, step by step so we can somehow localize the error.
1) Create a new c++ project. Let everything as it is. Make sure you save the project in a location where you have permission to write (your home directory would be fine)
2) Hit the compile and run button --> The project should build and run fine...
3) Add a breakpoint on the
cout << "Hello world!" << endl;
line. This should be the 7. line of code
4) Make sure you have selected the "Debug" target in the drop down menu near the build tool bar
5) Hit the debug button (red arrow, or hit F8)
6) The debugger should stop at this line.
6a) if not: Post a full rebuild log (hit the blue arrows near the build button) and post the log from the build log tab
6b) if it is working: lets go to your project..
7) In your project (I hope you use projects. Debugging is only possible with projects):
Make sure you have selected the "Debug" target as described in 4)
9) Hit the rebuild button (blue arrows near the build button or "Build->Rebuild" menu entry
10) set a breakpoint on line
11) Hit the debug button (red arrow, or hit F8)
12) The debugger should stop here. Make sure that you have focus to codeblocks. It is possible that a other window takes the focus from codeblocks away, so after the cmd window opened go straight to the codeblocks window. It should indicate the position of the current executed code with a yellow arrow over the breakpoint symbol. If you see the arrow you are successfully debugging.
13) If you are confused about the look, make sure that you have enabled the debugger view with "View->Perspectives->GCB/CDB debugger:default"
13 a) If you have somehow overwritten this perspective you can show the debugger windows with "Debug->Debugging Windows->Call Stack" etc.
14) If all this does not work post the full rebuild log from step 9)
greetings