Author Topic: Debugger won't stop at breakpoints  (Read 6384 times)

Offline Lily

  • Single posting newcomer
  • *
  • Posts: 4
Debugger won't stop at breakpoints
« on: September 06, 2011, 05:56:08 am »
Hello,

I need a bit of help. I am trying to use CodeBlocks debugger but it simply doesn't stop at breakpoints. It just run the program and "exit normally".
I searched on the web but most people who have a problem with the debugger have a error message or a warning in the console. I don't think I have !
Here is what I get in the console :

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /home/lily/workspace/cplusplus/Ex_Surcharge_Fraction/
Adding source dir: /home/lily/workspace/cplusplus/Ex_Surcharge_Fraction/
Adding file: bin/Debug/Ex_Surcharge_Fraction
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Program exited normally.
Debugger finished with status 0

It says "Setting breakpoints" but it doesn't stop at breakpoint. What do I do wrong ?
Could someone give some help about this ?

Thanks  :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugger won't stop at breakpoints
« Reply #1 on: September 06, 2011, 06:59:31 am »
Most likely either you forgot to compile with debug symbols (-g), use optimisations (-O1..3), or you stripped the debug symbols (-s). Check your compiler options at target and project level accordingly. BTW: searching the forum will reveal tons of other hints.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ