User forums > Using Code::Blocks
Debugging on the Fedora Core 6 Nov 11 version
nsiprof:
It is not that you don't get a window under all circumstances. When for example, you "build and run" the hello world program, then a console window appears and when yoy hit return it completes and the window goes away. The problem comes up when you single step through the code. No console window comes up. Also, it doesn't seem to stop at break points, when setting them. So for example, when setting the cursor on line 3 ( see below) and clicking on "run to cursor" the program stops at line 5. Then clicking on Next line, it goes to the next line, but no console window comes up. When continuing to click on next line, it does step through the program, but no console comes up as it does when just clicking on build and run. There are some other problems with the debugger, but one problem at a time. Is this a bug or is there some setup that needs to be paid attention to?
1. #include <iostream>
2.
3. int main()
4. {
5. std::cout << "Hello world!" << std::endl;
6. return 0;
7. }
Ceniza:
In your example lines 1, 2, 3, 4 and 7 are not instructions so the debugger won't stop there. If you add a breakpoint on line 3, 4 or 5 it'll stop on line 5 'cause it's the first instruction in that block. It's not a bug, it's just normal behavior.
nsiprof:
The question was: why doesn't the console window come up as it steps through the program? It comes up when build and run is clicked.
mandrav:
--- Quote from: nsiprof on November 17, 2006, 06:01:57 am ---The question was: why doesn't the console window come up as it steps through the program? It comes up when build and run is clicked.
--- End quote ---
You don't seem to be listening to what people are saying:
The debugger will not launch a separate console window under non-windows platforms. This is a known issue and patches that rectify it are welcome.
nsiprof:
Thank you.
Navigation
[0] Message Index
[*] Previous page
Go to full version