Add debugvars for functions