Updated

DETROIT -- Former Vice President Joe Biden tried valiantly at Wednesday's debate to keep his focus on President Trump and preview the general election battle he hopes to wage.

It lasted a matter of minutes.

The Democratic presidential primary front-runner was pulled quickly into battle with virtually every other candidate looking to score points by taking him out, and spent the better part of the night fighting off their withering attacks.

PROTESTERS REPEATEDLY INTERRUPT DEM PRIMARY DEBATE, SHOUT DOWN BIDEN, BOOKER, DE BLASIO

As he sought to avoid a repeat of last month's damaging clash with Sen. Kamala Harris, D-Calif. -- and indeed hit back at Harris' jabs, unlike last time -- he faced the added challenge in Detroit from Sen. Cory Booker, D-N.J.

The two senators tore into Biden's record on everything from health care to immigration to criminal justice reform -- as other candidates including New York Mayor Bill de Blasio also took aim at the former veep.

But Booker, who has struggled for months in the polls, was arguably toughest this time around, calling him out at one point for ducking a question on what advice he gave former President Barack Obama on deportations.

"You can't have it both ways. You invoke President Obama more than anybody in this campaign. You can't do it when it's convenient and then dodge it when it's not," Booker said.

The clashes started at the very beginning of the CNN-hosted debate -- which also featured numerous interruptions by protesters -- when Harris was asked about the Biden campaign’s criticism that her plan to give all Americans health care was a “have it every which way approach.”

JAY INSLEE LABELS TRUMP A 'WHITE NATIONALIST' AT DEBATE 

“Well, they’re probably confused because they’ve not read it,” she said, saying it was a “plan that was responsive to the needs of the American people.”

Biden was pointed in his response, warning the audience that they should be skeptical of a plan that claims to achieve something in 10 years, and said there was no talk about the cost or that Americans would lose employer-based coverage.

"You can’t beat President Trump with doubletalk on this plan,” he told Harris.

Later in the debate, Biden pushed back hard not only against Harris but others pushing "Medicare-for-all." He said they were not being honest and that such a plan would come with significant costs for middle-class Americans.

"There will be a deductible, the deductible will be in the paycheck," he said. He went on to cite a cost prediction that such a plan would cost $32 trillion.

"I don't know what math you do in New York, I don't know what math you do in California but that's a lot of money," he said, in an apparent reference to California's Harris.

But the predicted Biden vs. Harris matchup soon turned into a tag-team event.

Surrounded by candidates demanding that illegal border crossings be decriminalized, Biden struggled to push back. Booker dinged him for saying he wanted to "cherry-pick" the best and brightest immigrants, saying that was pitting one set of immigrants against another. Uncensored, Booker elaborated to suggest it demeans some as being from "s---hole countries," in a reference to a comment Trump reportedly once made.

Booker then tore into Biden on criminal justice reform, noting his past support for the 1994 crime bill that he blamed for having incarcerated African-Americans en masse. Biden responded by citing Booker's record as mayor of Newark, saying he did nothing in eight years to combat the "corrupt" police department -- but Booker was prepared.

"There's a saying in my community -- you're dipping into the Kool-Aid and you don't even know the flavor," he quipped, which triggered rapturous applause from the audience.

"Sir, you are trying to shift the view from what you created," he said.

At another point, he said, "The house was set on fire, and you claimed responsibility for those laws, and you can't just now come out with a plan to put out that fire."

Washington Gov. Jay Inslee later criticized Biden's climate change plan as not bold enough, while de Blasio repeatedly peppered Biden about whether he opposed the deportations conducted when he was vice president.

"Did you say those deportations were a good idea or did you go to the president and say this was a mistake, let's not do it," he asked Biden.

Biden responded by saying that he didn't want to discuss private conversations with Obama, but added that Obama "fundamentally changed the [immigration] system."

"I still don't hear an answer," de Blasio said.

Former Housing Secretary Julian Castro took issue with Biden's statement that "if you've crossed the border illegally, you should be able to be sent back. It's a crime."

"It looks like one of us has learned the lessons of the past and one of us hasn't," Castro said.

DE BLASIO: 'WE WILL TAX THE HELL OUT OF THE WEALTHY'

Later, Sen. Kirsten Gillibrand, D-N.Y., referenced a 1981 op-ed Biden had written in which he had opposed a childcare bill as it would subsidize "the deterioration of the family." She asked if she was doing that by having access to affordable daycare as a member of Congress. Biden responded by saying he opposed the bill as it gave a tax break to families earning over $100,000. He then cited his record in promoting equality legislation for women and noted that Gillibrand had even backed him on some of those efforts.

"I don't know what's changed except that you're running for president," he said to gasps from the audience.

Harris then seized on that moment to grill Biden on his changing stance on the Hyde Amendment -- which bans federal funding for abortion. She said Biden "made a decision for years to withhold resources to poor women to have access to reproductive healthcare, including women who were the victims of rape and incest."

"Do you now say that you have evolved and you regret that?" she said.

But Harris, in turn, was the subject of withering criticism from Rep. Tulsi Gabbard, D-Hawaii, who zeroed in on Harris' record as a California prosecutor and said she "put over 1,500 people in jail for marijuana violations and then laughed about it when she was asked if she ever smoked marijuana."

She also blasted Harris for maintaining the cash bail system which, she argued, disproportionately hurt poor people. Gabbard accused Harris of keeping prisoners beyond their sentence in order to use them as "cheap labor" as well as blocking evidence that would have "freed an innocent man from death row."

"The bottom line is, Senator Harris, when you were in a position to make a difference and impact in these people's lives, you did not," Gabbard said.

Sen. Michael Bennet, D-Colo., also called out Harris on her health care plan: “Senator Harris is my friend as well, but I have to say if we can’t admit tonight what’s in the plan, which is banning employer-based insurance, we’re not going to be able to admit that when Donald Trump is accusing Democrats of doing that as well." Harris accused Bennet of spreading "Republican talking points."

Biden had warned ahead of the debate that he was looking to avoid a repeat of last month’s debate in which he was savaged by Harris for his past in finding common ground with segregationists in the 1970s and opposition to federally mandated busing.

He subsequently saw a dip in the polls, although he has maintained his status as the front-runner, with Harris running in second place in many polls. He has appeared more clued in that, as the man to beat, he has the biggest target on his back.

“I’m not going to be as polite this time,” Biden told supporters at a recent fundraiser.

CLICK HERE TO GET THE FOX NEWS APP

When he took the stage, however, he was initially conciliatory with Harris, shaking her hand and adding with a smile: “Go easy on me kid.” Her campaign, though, took exception to the term "kid" on Twitter.

Entrepreneur Andrew Yang, meanwhile, expressed his frustration in his closing statement at the whole debate process.

"We're here with makeup on our faces and our rehearsed attack lines, playing roles in this reality TV show," he said. "It's one reason why we elected a reality TV star as our president. We need to be laser-focused on solving the real challenges of today."

Fox News’ Paul Steinhauser and Sam Dorman contributed to this report.