# How do I debug within an animation loop?

I'm trying to see some values within an animation loop, and am naively just console.log'ing when I need to, however, this usually results in the browser crashing from all the logs.

I'm working in JavaScript, but I don't think this issue is specific to JavaScript. How do people usually debug within an animation loop to see what values are?

Store logs into array for later examination. Inspect in browser, or save to JSON file and feed to external scripts. If there is too much data: skip some % of logs, look at small slices of it, apply some strong filters, or calculate statistics. Use visualization (like D3 or pyplot) if you feel fancy.