if foo = bar then
asm
int3
end
Depending on asm-mode, it may be "int 3".
Also I am not sure, how the different debugger back-ends deal with it.
IIRC gdb-based should handle it, FpDebug handles this in trunk.
if foo=bar then
sleep(1); // normal breakpoint here
Or any no-op operation. In asm: nop
Using a breakpoint on a normal code line, you can specify a condition. However string comparison does not work in gdb based. It works with FpDebug (at leat in trunk).
Further more, you can influence breakpoints depending on other code being executed.
https://wiki.lazarus.freepascal.org/IDE_Window:_Breakpoints#Breakpoint_properties "enable/disable group"
A none breaking breakpoint in some code, can enable or disable another breakpoint.
That can for example be used in calling code, so breakpoint are only active when code is called from certain locations.
(This should work with all backends)