Make sure not to use external debug info => that adds extra pitfalls. (e.g. old *.dbg file still on disk)
If there are issues, eliminate that factor.
Get rid of all ppu files, so the compiler must do a clean compile of everything.
Not sure if/when that may make a diff. But lets eliminate.
If some entire units don't have blue dots, then
- check they were compiled with debug info (e.g. if in a package)
- they aren't accessed via sym links (neither IDE, nor compiler)
- otherwise, its an yet unknown issue.
If some function or blocks of code don't have blue dots
- are they called / are they dead code
- are the "type TFoo = object ... end" => only 3.3.1 writes full debug info for those
- generics, in case of older fpc (iirc < 3.2.2)
If blue dot mis match the lines with code => force recompile that unit. (delete ppu)
If breakpoints don't show in source, but in breakpoint window (and if you stop at them, they should, otherwise your gdb is broken), then make sure no symlinks are involved.
That happens if and when the compiler saw a diff filename than the IDE.
With older fpc, that can happen for generics.
If you didn't set a breakpoint, and it does not show in the breakpoint window either => then check the gdb output
Menu: View > IDE Internals > Debug output.
There should be as "stopped... reason..." line.
Some versions of fpc write wrong info (not sure which, need to search for the bug report again).
In that case breakpoints at the very end of one function can trigger at the very start of the next (even across unit boundaries). Such breakpoints can also crash the debugged app... That can only be fixed in fpc.
FpDebug ignores such wrong info.