move debug to its own package