Changed 'debug' to the more general 'yieldAfter'