Add debug hook for frame debugging