1. A method for debugging a computer program, comprising: running at least part of said computer program on a computer, thereby prompting said computer to execute a sequence of instructions and to generate a trace corresponding to said executed sequence of instructions; and, when said program has generated an exception, selecting by said computer a set of one or more exception strings on the basis of said trace, so that each of said exception strings is a unique substring of said trace; and indicating said exception strings to a user or to a debugging tool.