The most dramatic moment in Wednesday’s gubernatorial debate had nothing to do with the gubernatorial race: It was Republican Gov. Charlie Baker refusing to say he would vote for Republican Geoff Diehl who is challenging Democratic Sen. Elizabeth Warren.

Democratic challenger Jay Gonzalez put the question directly to Baker during the debate at WGBH, but Baker demurred, saying he has not made up his mind how he will vote in the Senate race.

Baker said he has been clear with his positions in issues like abortion rights and gay rights where he disagrees with the national Republican leaders, but said “I have not made a decision” about voting for Diehl, who stands firmly behind President Trump and GOP leadership in Washington.

Gonzalez said Baker’s unwillingness to simply renounce Diehl showed he has more loyalty to the Republican party than to his Massachusetts constituents.

Speaking with reporters a few minutes after the debate, Baker changed his stance. “I’m gonna vote for him,” Baker said. “I said I’m going to support the ticket. I simply misspoke.”

Gonzalez told reporters he was surprised to hear Baker had reversed himself after the debate. “He probably said it two or three times in the debate. … He can't have it both ways.”

Other than that tense exchange, the debate, moderated by WGBH's Margery Eagan and Jim Braude, followed a predictable rhythm: The incumbent claimed progress in areas ranging from education to transportation to deficit reduction, and the challenger said none of it was enough.

“We inherited a big deficit and everybody told us we were going to have to raise taxes,” Baker said, but even without major tax increases, “now we have a big surplus.” Baker said he has boosted spending on transportation and improved the operation of the T by investing “in boring stuff” like railroad ties and tracks. And he noted that he has launched work on a massive off-shore wind farm off New Bedford.

Gonzalez rejected Baker’s achievements as “status quo stuff” and said he would be a much more vigorous leader on issues such as transportation, energy and education. “We need leaders who aren’t going to do the same old stuff — the same old Republican playbook,” Gonzalez said.

Perhaps the clearest policy distinction between the two revolves around Gonzalez’s signature proposal to raise billions of dollars in new tax revenue from a tax on millionaires and another on college endowments.

Baker said that even if Gonzalez could get his tax plan approved, it would be years before it would generate any actual revenue to fund the Democrat’s broad agenda.

“That’s not really governing, or leadership. That’s politics,” Baker said.

Gonzalez came into the debate trailing Baker badly in money and support. According to a UMass Lowell poll, as of the first week of October, Baker had a 66-27 lead, and 29 percent of registered voters had never heard of Gonzalez.

This dynamic also plays out on social media: Google Trends data shows that within the Commonwealth, search interest in Gov. Baker — that is, the number of searches for information about him — has generally been about double the search interest in Gonzalez. The only time Gonzalez attracted more search interest than Baker was Sept. 4, the day of the primary that made him the Democratic nominee.

But his search traffic spiked over Baker's in the moments after the governor's comments on Diehl.

And according to the most recent reports on file with the Massachusetts Office of Campaign and Political Finance, Baker has spent more than $6 million during this campaign season and still has more than $4 million cash on hand. Gonzalez, meanwhile, has spent less than $1 million so far and had only about $200,000 on had at the end of September.

In the hour before the debate, a few dozen Baker supporters were in a cheering match with a similar number of Gonzalez supporters outside the WGBH News studio. The governor’s supporters chanted, “Four more years!” while supporters of the Democratic challenger yelled, “Jay for M-A!”

K. Sophie Will, Maggie Penman and Mike Deehan contributed to this article.