debugtools handle internal functions