Debugger exiting at cout statements?

CodeLite installation/troubleshooting forum
Tarikhajk
CodeLite Curious
Posts: 1
Joined: Sun Oct 21, 2018 3:55 am
Genuine User: Yes
IDE Question: C++
Contact:

Debugger exiting at cout statements?

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger exiting at cout statements?

Post 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
Make sure you have read the HOW TO POST thread
Post Reply