Ported debug API functions.