“To be perfectly blunt, I think it is disingenuous to say you would support a congestion-pricing plan and then talk about the number of carve-outs that you’ve suggested today,” Mr. Carroll said.

That was immediately followed by a critique from another Democrat, Senator Diane J. Savino, who represents Staten Island and parts of southern Brooklyn, who said that many of her constituents, as well as residents of transit-starved sections of the Bronx and Queens, drove because they did not have the luxury of a one-seat ride via public transportation.

“Not everyone who drives to work is rich,” Ms. Savino said.

Mr. de Blasio’s testimony also took place amid simmering tension between Mr. Cuomo and the Democratic-led Senate over the issue of a plan to put a corporate campus for Amazon in Queens, using billions of dollars in state and city tax incentives. On Friday, Mr. Cuomo accused the Senate of “governmental malpractice” in its approach to the plan, particularly the proposed appointment of a prominent Amazon critic, State Senator Michael Gianaris, to a board with potential veto power.

Mr. de Blasio found himself repeatedly defending the deal in the face of questions from lawmakers on both sides of the aisle, including Senator John Liu, another newly elected Democrat who wondered aloud why Amazon was being given tax breaks potentially worth $3 billion when tech companies like Google have said they would expand their work force without such incentives.

Mr. de Blasio countered, saying the Amazon deal was pro forma. “The vast majority of the subsidy that Amazon got was standing incentive programs,” he said. At another moment, Senator Jessica Ramos of Queens, a former aide to Mr. de Blasio, suggested that the most logical option for a progressive leader would have been to raise taxes on Amazon, rather than to give it tax breaks.

And so on. (Mr. de Blasio pointed out several times, seemingly to no avail, that state lawmakers, not he, had the power to make the changes they were requesting.)

Then, too, there was the small issue of Mr. Cuomo, Mr. de Blasio’s most prominent and powerful critic here. Mr. de Blasio’s remarks made it clear that there were conflicts in his wanting more funding for education and the city’s decrepit public housing.