After hours of bitter debate , lawmakers voted 219-212 to put the US economy under a " cap-and-trade " system for managing carbon emissions in a move its backers said would create jobs and restore shaky US leadership on climate change .