1. A method for debugging a program upon expiration of a timer, the method comprising: encountering via a processor a break exception during an execution of a program; determining if the break exception is raised by a first trigger that has a first expiration time, or by a breakpoint; in response to determining that the break exception is raised by the first trigger, breaking the program execution, starting a timer and resuming the program execution without passing control to a user interface thread; in response to encountering a second break exception trigger and a third break exception trigger after starting the timer and resuming the program execution, wherein the second break exception trigger has a second expiration time that is different from the first expiration time and the third break exception trigger has a third expiration time that is different from the first and the second expiration times, setting an earliest of the first expiration time, the second expiration time and the third expiration time as a registered expiration time for the timer; in response to the started timer reaching the registered expiration time, or in response to determining that the break exception is raised by the breakpoint, breaking the program execution, passing control to the user interface thread, performing a debugging operation, and resuming the program execution upon indication of the user interface thread; in response to the started timer reaching the registered expiration time, resetting the registered expiration time for the timer to an earliest of the first expiration time, the second expiration time and the third expiration time that was not set as the registered expiration time for the timer, and restarting the timer; and breaking the program execution in response to the restarted timer reaching the reset registered expiration time.