A dentist's crown caliper works great! Look for at least 1 mm of rim wall thickness
Also a micrometer helps measuring the sidewall wear depth. Mine has a gauge that comes out of the "non-business" end and works well.
A section cut out out of a rim I replaced this spring. The spread between beads (outside) on the rim is 28 mm instead of the original 26 mm, which signals a weakness in the rim's sidewall. Also one sidewall is less than 1.00 mm thick which is dangerous, and the sidewall's concave depth at the braking surface is 0.66 mm. Anything over 0.30 mm I take the tire off and check the sidewall thickness with a caliper.
Another thing to measure is your rim width on the bead side. Use an ordinary caliper, micrometer, or a ruler if the tire is off the rim. Compare your rims; they should not be any wider than when they were new. You can also check the manufacturer's specifications.
One of my duties as a volunteer in our school district's Bike Safety Program is maintaining and performing the safety checks on the 37 bikes used in the program. We teach bike safety to 5th graders in the city's five elementary schools. I was concerned after finding an obviously dangerous rim in this spring's inspection. I came up with a method for checking all the bikes' wheels using the tools discussed above without removing the tires from all of the bikes.