If you encountered a significant bug in your code, how would you approach fixing it?

Situational