debug trace function (animation)