With the Iowa caucuses days away, two of the remaining Republican presidential candidates — Ron DeSantis and Nikki Haley — clashed on the debate stage on Wednesday night over the economy, foreign policy and their records in their states, Florida and South Carolina.

The fifth debate this primary season once again was notable for the absence of former President Donald J. Trump, the Republican front-runner who opted instead to hold a town hall event sponsored by Fox News at the same time his rivals were facing off. It also featured a shrinking field, as Chris Christie had announced hours before the debate that he was dropping out of the race. That put added pressure on Ms. Haley to deliver a strong performance to solidify her position as Mr. Trump’s primary alternative, while Mr. DeSantis needed to jolt his sputtering campaign to maintain a foothold in the race.

Political analysts and pundits observed that the Mr. Trump continued to benefit from staying away from direct engagement with his Republican rivals, with some suggesting that he had delivered a surprisingly “cogent” performance at his event across town, while the tenor of the conversation between Mr. DeSantis and Ms. Haley often grew caustic and personal as they tiptoed around questions about Mr. Trump’s character. While Ms. Haley avoided any notable stumbles, few thought that she had managed to get the better of Mr. DeSantis.

Here’s a sampling of the reaction.

“Trump decision not to indulge and validate the debate exercise was a shrewd move in its own right, but leaving them to tear each other apart is a nice fringe benefit,” said Liam Donovan, a former member of the staff of the National Republican Senatorial Committee. “The little lines and digs might please their backers but it’s really tough to imagine any of this appealing to folks looking to make a decision.”

“If DeSantis had been this good in the first primary debates, he’d be in a much stronger position today,” said Frank Luntz, a focus group moderator, pollster and communications strategist who worked for Republican candidates. “I’ve been critical of him, but he’s on fire tonight.”

“In terms of what the stakes were tonight with Haley and DeSantis debating, I felt like just stylistically that Ron DeSantis has become a better debater,” said Rachel Maddow, the MSNBC host. “He has gone from first gear to grinding toward second gear. Nikki Haley, I think, has stayed exactly the way she was.”

“Haley seized the opening that Christie left, emphatically calling out Trump’s cowardice for dodging debates, and didn’t flinch from the abortion bans the base wants,” said Jesse Lee, a former spokesman for the National Economic Council in the Biden administration. “DeSantis is still terrified to give any reason to vote for him over Trump.”

“DeSantis moved well ahead on points, I think,” said Scott Jennings, a conservative commentator on CNN and former aide to President George W. Bush, referring to Ms. Haley’s regular references to her DeSantis fact-checking website. “Haley cratered with this website gimmick. Weird enough to blunt her momentum? We’ll see, but DeSantis needed a good night in Iowa and he got it.”

“Switching between CNN and Fox and there is just no comparison,” said Megyn Kelly, host of the Megyn Kelly radio show and a former Fox News anchor. “Trump on TV is totally compelling. He’s funny, he’s interesting and he was very ‘on’ tonight.”

“Tour-de-force performance tonight by Trump in his Iowa town hall hosted by Fox,” said Paul Sperry, a conservative writer and New York Post columnist. “I have not seen the president this cogent and lucid in some time.”

“Trump handed Joe Biden a gift when he gushed repeatedly about how Roe was overturned only because of him,” said Alexandra LaManna, a former White House spokeswoman who focused on reproductive rights in the Biden administration, referring to Mr. Trump’s comments during the Fox News town hall. “The Biden campaign will no doubt make sure that voters see this clip of Trump bragging about taking freedoms away from Americans a whole lot between now and November.”

“Each seems to be accusing the other of being secretly corrupted by the Chinese,” said Michael Pillsbury, a top China adviser to the Trump administration. “My impression is they could not, and did not, attack Trump on China policy, so he won.”

“Even as deficits surpass $2 trillion on the way to $3 trillion, both candidates are promising more tax cuts and only minor spending savings over the next decade,” said Brian Riedl, senior fellow at the right leaning Manhattan Institute think tank. “It’s pandering to voters by avoiding almost all the tough choices that will be necessary to avoid a debt crisis.”

“It’s not Hepburn and Spencer, but DeSantis/Haley is the rom com we deserve,” said Caitlin Flanagan, an author and social critic, comparing the squabbling between the candidates to a bad romantic comedy.

Alyce McFadden contributed reporting.