1. A method of managing code-tracing data in a target program, the method comprises the steps of: identifying when an exception occurs in the target program; accessing a stack trace of a call stack to identify a module in the target program that threw the exception; assigning a level of code tracing in that module including activating code-tracing at a high detail level in that module; and returning the code-tracing levels to a default value after a time period expires with no exception being thrown.