At least for gcc compile you go at:
Project->Build options
You select the Compiler Tab and beyond this the Compiler Flags.
The first option is: [ ] Produce debuggin symbols (-g)
This will do the trick.
Mention that if you set this option at a specific target. (e.g. "Debug") you must compile and try to debug at this target.