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; and activating code-tracing at a high detail level in that module.