Thick books called Bibles for C , Pascal etc, and lots of flipping in between the pages, running external debuggers, doing step by step debugging, and other tricks.
And tackling it methodically and logically.
Not humanly possible with vibe coding, especially on large projects.