This behavior of the debugger is exactly what I would expect and hope to get, and I would curse any other behavior. If I watch some $t variable, I really want to know what will happen if I use this variable anywhere in my code. Semantically, it is true that you really have two different $t variables, one scoped to the program, and another one scoped to the subroutine. But from the standpoint of what the code does and sees, or of what I see when I read the code, you have only one variable name. So if my code uses this variable name, I really wish the debugger to tell me that this variable name now refers to a different content. The debugger is doing it right on this issue.