Sounds like what you'd like is a way to select a body in a Testbed test, and get textual output on its state. There's no straight-forward way to get this sort of additional information about a body however (not in the Box2D 2.3.3 or earlier Testbed program).
I do like this idea as an enhancement of the Testbed. I don't think that would be too hard for me to do at least in my Box2D fork. I've created an issue for this.
In the meantime (until such a feature made it into a build of the Testbed that you had), you could run the Testbed through a debugger and use breakpoints to get this information. It'd be complicated however by having to figure out which data structure related to which body and by having to figure out when to get the break point to trigger.
OTOH, if what you're asking for is a programmatic way of getting body state, at least in the C++ version of Box2D there's methods you can call on the b2Body
object for this. GetLinearVelocity()
for example will get the linear velocity of the body. I suspect pybox2d
has a similarly named accessor mechanism.