I can't tell for sure from your description what the issue is....
1) First of all, I assume Lazarus 2.2.6 ? (or 2.2.n)
2) Your OS?
3) Project Options > Debugging
a) Generate info for debugger enabled?
b) Type of debug info? (Dwarf ....?)
Should be
For GDB based debugger : Dwarf with sets
For FpDebug: Dwarf-3 or Dwarf with sets (chose the latter, if you may switch back to gdb at some point)
4) Tools > Options > Debugger Backend
Which debugger is selected? "GNU Debugger (gdb)" or "FpDebug (...)"
If not "FpDebug" => try FpDebug.
5)
Have you got the "Stack Window" open? Menu: View > Debug Windows > Call Stack
If so, what does it show?
If it does show function names, which one is active (little green arrow in the left-most column)
Maybe you need to select a difference line? (select line, click "green arrow" tool button)
6)
"$" is not a valid number.
- What is the exact term you are looking at?
- Are you hovering the mouse?
- Can you copy the term to the "Watches" window?
7)
I get an FPC exception
I.e., "Run time error"?
Or "The project raised an exception ..." ?
If the first, and if "sysutils" is used, then if you continue (F9) you should get the "raised an exception" => Do you get different info then (see your code in the stacktrace, in case it had not been there before)
If you do get an "Access violation" or "Sigfault" then that is different.
E.g. if you get stack corruption, then the assemble window may open, and show you code at adress 0x0000000 (which does not exist).
Or it may show you code at a random address which may or may not be in your exe.
If your stack got corrupted, then getting data may or may not be possible. Because if the stack is corrupted, it is possible that all and any info where your code is/was has been lost.