Not exactly lush vegetation |
Aside from those that died recently enough to leave us mummified, rather than fossilised, remains, your best bet is probably fossilised dung. In the case of carnivores you might even be lucky enough to find the bones of their kills. Of course, both do need matching up to the correct animal, but the former, in particular, is not especially common. Absent such direct clues, then, we have to deduce what we can from the skeleton, and that generally means examining the teeth.
The overall shape of the teeth can give us some pretty clear indications of whether an animal was a carnivore or a herbivore. This is even more true for mammals than it is for dinosaurs, since we have plenty of clear examples alive today. Powerful stabbing canines and flesh-shearing molars indicate a carnivore, while flat grinding plates and leaf-clipping incisors imply a herbivore. There's obviously some gradation in between, in the case of omnivores, insectivores, and, for that matter, weird specialists such as vampire bats, but it's a good starting point.