Mr. Rubio tried to get under Mr. Trump's skin by boring in on Trump University, the defunct education and training venture over which Mr. Trump is facing civil litigation alleging that he defrauded students. Recalling that he had spoken to "one of the victims," Mr. Rubio said that what students had gotten in the courses was "stuff you could pull off of Zillow."
"Why won't you give them their money back?" Mr. Rubio asked.
Mr. Trump, who described the litigation as "a minor civil case," claimed that almost all students who had signed up for the courses "said it was terrific," but he quickly lost patience with Mr. Rubio. Calling him "little Marco" — a phrase he used several times — Mr. Trump noted that the senator was losing to him in Florida polls before the state's March 15 primary.
"The people in Florida wouldn't elect him dogcatcher," Mr. Trump said.
Mr. Rubio, his voice ragged, appeared frustrated at times as he repeatedly sought to sow doubts about Mr. Trump. He has been trying for months to catch fire against Mr. Trump, whom he holds in low regard on policy matters, and now the Florida primary looms as make-or-break for Mr. Rubio's candidacy.
"You have yet to answer a single serious question about any of this," Mr. Rubio said, referring to Mr. Trump's generalities on foreign affairs. As Mr. Trump responded by reiterating praise he had received from President Vladimir V. Putin of Russia, Mr. Rubio threw his arms up and turned away in exasperation.
If Mr. Trump struggled to deflect the attacks on his character, business sense and political viability against Mrs. Clinton in the fall, he seized opportunities to reassure conservatives that he would be a forceful commander in chief. Questioned by the moderators about his past advocacy for torture and for killing the families of terrorists, Mr. Trump stood firm and argued that "we should go tougher than waterboarding." Pressed about whether military officers would carry out such orders — killing terrorists' family members would violate the Geneva Conventions — Mr. Trump offered a boast.
"If I say 'do it,' they're going to do it," he said.
At another point, in a rare concession from Mr. Trump, he acknowledged that he was "changing" one of his positions in the highly charged immigration debate and was now open to offering visas for highly skilled foreign workers. He also lamented that foreign citizens "go to the best colleges" in America and "as soon as they are finished, they get shoved out," and said he was "softening the position because we have to have talented people in this country."
While his shift could appeal to some business leaders and moderate voters he would need in a general election, his campaign also issued a statement after the debate saying he would "institute an absolute requirement to hire American workers first for every visa and immigration program. No exception."
Mr. Trump's shifting positions have been a target for months, but during this debate, his rivals received help from the Fox News debate moderators. They played a compilation of video clips in which he was depicted changing his mind on issues like the war in Iraq. Mr. Trump was then asked directly if he had "a core."
"I have a very strong core, but I have never seen a successful person who wasn't flexible," Mr. Trump said.
One of the most anticipated face-offs of the night was between Mr. Trump and the moderator Megyn Kelly, who infuriated the candidate with her aggressive questions at the first Republican debate in August. Ms. Kelly and Mr. Trump breezily engaged each other on Thursday night, but Ms. Kelly was pointed if polite in her questioning.