Page 1 of 1

Debugger exiting at cout statements?

Posted: Sun Oct 21, 2018 4:09 am
by Tarikhajk
Hey guys,

So I'm using Codelite to code in C++ on a windows machine, and so my projects are debugged by the GNU gdb debugger. The debugger seems to get stuck at any

Code: Select all

std::cout << .......   ;
statement and then exits after a few useless 'Next' clicks. I've tested this out by initializing a few variables in main and performing some basic mathematical operations. The debugger reaches the 'return 0' statement no problem. This time, I snuck in a

Code: Select all

cout << "Hello" << endl;
two statements in and the debugger gets there, prints out "Hello" to the console. The green debug arrow gets stuck at this line and doesnt proceed when I click next. A few useless clicks latter i see the following text in the 'Output' pane:

Single stepping until exit from function _ZNSolsEPFRSoS_E,\nwhich has no line number information.
Continuing...


..another 'Next' click on the debugger, and then this...:

Single stepping until exit from function _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_,\nwhich has no line number information.
Continuing...


Then the debugger just exits, without processing any of the other operations/expressions to follow. Any ideas?
P.S. I do have "using namespace std;" declared, and the code compiles and executes normally/completely when not in debug mode.

Re: Debugger exiting at cout statements?

Posted: Tue Oct 23, 2018 11:13 am
by eranif
This sounds like a compiler issue and not really related to CodeLite.
You should try and debug your code from a terminal (CMD) and see if it also stuck, this will give you an idea if this is a CodeLite issue (which I doubt) or MinGW / GDB version issue. You should also state which version of the compiler you are using, which version of CodeLite etc