on *:close:@*:if ($target == $debug) .debug off
will be better