Why coder must use /window -c @blah2 if custom-window @blah2 don't exist ? If that is so big problem.. The if(-*c* iswm $1) will solve the problem..
Forget about debug, but that alias will also help the coder

Alias Debug {
var %Window = $matchtok($1-, @, 1, 32)
if (!$window(%Window)) echo -set Taram!
debug $1-
}
You code is a solution.. But imo my solution is better.. And faster..