It seems that the Box2D debug render body function incorrectly moves the x coordinate when the camera moves.

In this gif, only the camera is moving, the body is completely static.
This forum post suggests the solution is in Box2D, in the renderBody method, changing
xf.p.x += -body.game.camera.x / world.ptmRatio;
xf.p.y -= -body.game.camera.y / world.ptmRatio;
to
xf.p.x -= -body.game.camera.x / world.ptmRatio;
xf.p.y -= -body.game.camera.y / world.ptmRatio;
Seems to fix things.
Wouldn't the fix be better like this:
xf.p.x += body.game.camera.x / world.ptmRatio;
xf.p.y += body.game.camera.y / world.ptmRatio;
I think there's no reason for the double minus sign.
Most helpful comment
Wouldn't the fix be better like this:
I think there's no reason for the double minus sign.