BAE Systems USA interview question

Name a time you had to document something. How would you go about debugging code.