First of all, the caterpillar is the prey of the frog, and it can't feel the pain or discomfort of the caterpillar. Secondly, the frog's mouth and tongue have strong adsorption and flexibility, and it is easy to swallow the caterpillar whole. In the digestive system of frogs, caterpillars are broken down and absorbed as a source of nutrition.
Therefore, frogs eating caterpillars will not cause pain or discomfort. But for humans, seeing frogs eat caterpillars may cause discomfort or nausea, but this is based on our cultural and personal feelings and has nothing to do with frog behavior.