This does work (kinda) in 3.99.
It only affects the display in the watches Window (and locals, inspect, ...).
The problem is that FPC encodes "currency" as plain integer in the debug info. So the debugger (fpdebug, gdb, lldb) itself does not know.
However, in 3.99 "debug visualizers" (aka "value formatters") exist:
https://forum.lazarus.freepascal.org/index.php/topic,66186.0.htmlAnd they amend at least how it is displayed.
Downside, if you add a watch like:
MyCurrencyVar + 1
MyCurrencyVar + MyIntVar
Then the result is calculate in the debugger, and the Integer value will add 0.0001 to the currency var.
But to fix this, fpc needs to provide the correct info to the debugger...
Well, maybe FpDebug can get an option to override that info. But that is problematic too, because all it has to detect currency is the typename (though that is the same for the "dbg visualizer"), and you can have code like
And then translating this into fixed point, would be wrong (and will be incorrectly displayed if the dbg-visualizer is active).