Added lifecycle debug example code to chat