Is you procedure inlined?
He had it originally working with GDB, at least that is my understanding. So the compiler settings should be fine. Unless he had chosen "STABS", but then the IDE would force him to change that (the infamous "which dwarf" dialog). So that ain't it either.
How exactly does it not work. What happens when you try to debug?
Blue bubbles on the left side of editor not appear and breakpoints not work.
I changed settings from Menu: Tools > Options => Debugger > Debugger Backend and again debugging not work with FpDebug.
Ok, so
a debugger is running => without it the IDE would not show blue dots. And it also means the debug info is fine (i.e. if the debugger is FpDebug, then it is DWARF, or the blue dot info would not have been there).
Off the top of my head, reasons for not stopping at a breakpoint.
None off them seem to apply to the attached test project.
- Breakpoint at a line that does not have a blue dot.=> gdb will stop at the next line (even if that is 1000 lines down)
=> FpDebug will for up to 3 or 4 lines (but not in older IDE)
Though the answer was 4.99 => then it should.
Anyway try it on a line that has a blue dot, in case you had it at a line before.
If you were more than 4 lines (empty/comment lines) above the next blue dot, then that would explain it.
* Which color does the breakpoint have? Red, Orange, Green?
* What symbol is shown on the breakpoint: Question mark, X/Cross, Check/Tick/Ok-Sym, "pause" (2 bars) ?
Dead code"if false then" or entire procedures that are never called...
may lead to code with blue dots...
Yet, if gdb stopped.... Then that is not it...
inlinedwill efficiently not be called. The inlined code is all at the one line that has the call to the procedure
Yet, if gdb stopped.... Then that is not it...
genericsI am not sure, IIRC depends on FPC version => sometimes specialized generics are attributed to the wrong unit, then they wont stop (they can be stepped into, but with side effects.)
Yet, if gdb stopped.... Then that is not it...
Just looked at the project again: External debug info That should work. But it be best to test without that setting.External debug info contains a checksum, and can be in diff locations. If there is an old file left, and that has the wrong checksum, then that can cause issues (and not sure if it will do the same in gdb).
"Project Options" -> "Compiler Options" -> Debugging: "Use external debug ... -Xg"
--EDIT: Actually, if you have blue dots, then it was read, and it works with the external.
Leaves: Color and Symbol on the non working breakpoints.