Democratic presidential candidates wasted little time during the second night of the first 2020 primary debates going on the attack against President Trump Donald John TrumpSteele Dossier sub-source was subject of FBI counterintelligence probe Pelosi slams Trump executive order on pre-existing conditions: It 'isn't worth the paper it's signed on' Trump 'no longer angry' at Romney because of Supreme Court stance MORE, a stark difference from the night before.

Front-runners former Vice President Joe Biden Joe BidenPelosi slams Trump executive order on pre-existing conditions: It 'isn't worth the paper it's signed on' Hillicon Valley: Subpoenas for Facebook, Google and Twitter on the cards | Wray rebuffs mail-in voting conspiracies | Reps. raise mass surveillance concerns Fox News poll: Biden ahead of Trump in Nevada, Pennsylvania and Ohio MORE and Sen. Bernie Sanders Bernie SandersThe Hill's Campaign Report: Trump faces backlash after not committing to peaceful transition of power Bernie Sanders: 'This is an election between Donald Trump and democracy' The Hill's 12:30 Report: Trump stokes fears over November election outcome MORE (I-Vt.) targeted Trump in early statements, while other candidates sharply criticized the president's tax cut bill and his immigration policies.

ADVERTISEMENT

"Donald Trump thinks Wall Street built America. Ordinary, middle-class Americans built America," Biden said in fielding his first question of the evening.

Biden added that Trump "put us in a horrible situation" with worsening income inequality, and later used his closing statement to chastise Trump over his handling of a 2017 white supremacist rally in Charlottesville, Virginia.

Sanders, a self-identified democratic socialist who has pushed progressive policies including "Medicare for All," was asked whether he believed his nomination would lead to Trump's reelection as some detractors have argued.

He noted that some recent polls show him leading Trump in a hypothetical match-up "because the American people understand that Trump is a phony, that Trump is a pathological liar and a racist, and that he lied to the American people during his campaign."

Sen. Kirsten Gillibrand Kirsten GillibrandSunday shows preview: Justice Ginsburg dies, sparking partisan battle over vacancy before election Suburban moms are going to decide the 2020 election Jon Stewart urges Congress to help veterans exposed to burn pits MORE (D-N.Y.) lamented that Trump has "torn apart the moral fabric of who we are" in criticizing his zero tolerance policy that led to the separation of hundreds of migrant families.

An audience question later in the debate asking how candidates would reverse damage done by Trump to democratic institutions teed Sen. Michael Bennet Michael Farrand BennetOVERNIGHT ENERGY: House Democrats tee up vote on climate-focused energy bill next week | EPA reappoints controversial leader to air quality advisory committee | Coronavirus creates delay in Pentagon research for alternative to 'forever chemicals' Senate Democrats demand White House fire controversial head of public lands agency Next crisis, keep people working and give them raises MORE (D-Colo.) up to take direct aim at the president.

"We have to restore our democracy at home," he said. "The rest of the world is looking for us for leadership. We have a president who doesn’t believe in the rule of law, he doesn’t believe in the freedom of the press, he doesn’t believe in independent judiciary, he believes in the corruption that he’s brought to Washington, D.C., and that is what we have to change."

Other candidates took more indirect swipes at the president.

Sen. Kamala Harris Kamala HarrisHundreds of lawyers from nation's oldest African American sorority join effort to fight voter suppression Biden picks up endorsement from progressive climate group 350 Action 3 reasons why Biden is misreading the politics of court packing MORE (D-Calif.) criticized a GOP-backed tax cut bill that Trump has championed, arguing that it has disproportionately helped the wealthy while increasing the national debt.

Andrew Yang Andrew YangDoctor who allegedly assaulted Evelyn Yang arrested on federal charges The Hill's Campaign Report: Biden weighs in on police shootings | Who's moderating the debates | Trump trails in post-convention polls Buttigieg launches his own podcast MORE, a former tech entrepreneur, warned that Trump was elected because of automation of jobs in the rust belt in laying out his platform.

The prominence of Trump during Thursday night's debate was a shift from night one, where candidates sparingly mentioned the president.

He was largely mentioned on Thursday by front-runners like Biden and Sanders who have framed their campaigns as a challenge to Trump rather than their follow Democratic candidates.

An NBC News tracker of how often each candidate mentioned Trump by name or title showed that the president came up 52 times total on Thursday.

Biden mentioned him nine times, more than any other candidate, while Gillibrand and author Marianne Williamson Marianne WilliamsonMarianne Williamson discusses speaking at People's Party Convention Fewer people watched opening night of Democratic convention compared to 2016 Marianne Williamson: Democratic convention 'like binge watching a Marriott commercial' MORE referenced Trump seven times each.

The president, who is in Japan for the Group of 20 summit, appeared to have an eye on the debate in between meetings with world leaders. He criticized the candidates over their support of covering undocumented immigrants with their health care plans ahead of taking a meeting with German Chancellor Angela Merkel.

"How about taking care of American Citizens first!?" he tweeted. "That’s the end of that race!"

Seated next to Merkel a short time later, Trump offered his thoughts on the debate.

"They definitely have plenty of candidates, that's about it. I look forward to spending time with you, rather than watching," he said, referring to the German leader.

Updated at 11:14 p.m.