Sunrise Labs interview question

How do you go about debugging and testing code?