Usually rebuilding FPC with debug information takes some time, and I try to avoid this. In fact, I have a special installation of FPC with debugging enabled, as well as a special Lazarus installation which is permanently linked to this "debug-FPC". In this case, debugging of an FPC unit is just a matter of opening the project in that "Debug-IDE".
An annoying feature of the debug-FPC is that during debugging always system routines are entered which makes it very easy to lose track of where the debugger actually is.
Sometimes using the debug-FPC can be avoided: When the unit to be debugged is at the "end of the food chain", i.e. no other FPC unit used by your project depends on it, then you could try to copy the unit into your project directory. Then your project will use this copy rather than its original in the FPC directory. And when you are lucky compilation will still be successful in spite of this change. In this case, you'll be able to debug that unit like any other project unit. Later, after you have fixed the issue, simply delete the copied source unit and delete also the compiled unit output directory - now the compiler will use the original unit again.