zsh: add debug switch to local function