The second set of 10 Democratic presidential candidates hit the stage Wednesday for Night 2 of the second presidential debate.

While former Vice President Joe Biden faced off against Sen. Kamala Harris of California and others joined the fray at Detroit's Fox Theater, NBC News fact checked everyone on stage in real time.

Here's how Wednesday night's contenders — and Donald Trump, who tweeted during the debate — fared when it came to telling the truth.

Did Barack Obama put protections for 'Dreamers' into law, as Joe Biden claimed?

Earlier in the evening, Biden suggested that President Barack Obama put a plan to protect "Dreamers" — some 700,000 undocumented immigrant who were brought to the U.S. illegally as children — into law.

"The president came along, and he's the guy that came up with the idea the first time ever, dealing with the Dreamers. He put that in the law," Biden said, attempting to fend off a broadside from New York City's mayor over the number of deportations that occurred under the Obama administration.

But that's not true. The DREAM (Development, Relief and Education for Alien Minors) Act was a bill that would have given legal status to the so-called “Dreamers.” Several versions of the bill have been introduced in recent years — including while Obama was president — but it has never passed.

Faced with that reality, Obama signed an executive order in 2012 that put into place his Deferred Action for Childhood Arrivals (DACA) program, which allowed "Dreamers" without felonies or serious misdemeanors to stay in the country and be eligible for work permits.

However, because it was put into place via executive action, it was always possible that the program would only be temporary. In 2017, President Donald Trump moved to end DACA, although the effort is still tied up in court. The Supreme Court said in June it would decide the fate of the program during its next term.

Did 'almost all' of the tax cuts since 2001 go to the wealthiest Americans?

"Since 2001, we have cut $5 trillion worth of taxes. Almost all of it has gone to the wealthiest people in America,” Michael Bennet claimed Wednesday night.

This is exaggerated.

Nearly two-thirds of $5.1 trillion in tax cuts went to the richest fifth of Americans, according to a 2018 report from the left-leaning Institute on Taxation and Economic Policy. That’s quite a lot, but it’s not “almost all.”

Biden alleged Kamala Harris allowed 1,000 prisoners back on the street. Is that true?

Biden attacked Harris' record as attorney general of California on Wednesday night with a lengthy story, earning protestations from Harris about the accuracy of his claims.

Biden suggested that Harris defied staff recommendations and failed to disclose information about law enforcement misconduct to defense attorneys. As a result, Biden said, "Along came a federal judge and said enough, enough. And he freed 1,000 of these people. If you doubt me, Google 1,000 prisoners freed, Kamala Harris," Biden said.

What Biden said is mostly true, though he muddled a few details in his telling.

As attorney general, Harris’ aides encouraged her to adopt a Brady policy in 2005 — a rule requiring prosecutors to disclose past misconduct by law enforcement witnesses — to defendants and their attorneys. According to The Wall Street Journal, she did not do so for years and came under fire when a scandal highlighted her department's lack of such a policy.

In 2010, a police crime-lab technician — with a criminal conviction that had not been disclosed to defendants and likely would have kept her away from processing drug evidence — was found to be skimming cocaine from evidence for personal use, according to The Wall Street Journal. With those lab results jeopardized and results considered tainted, roughly 1,000 cases were dismissed or dropped. A Superior Court judge blamed Harris for the fiasco and Harris reportedly scrambled to officially institute a Brady policy. So, while 1,000 "prisoners" were not released, some 1,000 cases were dismissed or dropped.

Biden did inaccurately claim that Harris never instituted a Brady policy. She did do so after the crime lab scandal.

Donald Trump tweets about Barack Obama's immigration policy. Is what he claimed true?

The cages for kids were built by the Obama Administration in 2014. He had the policy of child separation. I ended it even as I realized that more families would then come to the Border! @CNN — Donald J. Trump (@realDonaldTrump) August 1, 2019

While it’s true the Obama administration built some of the migrant detention facilities — including one in 2014 — that have housed children during both administrations, Trump is misstating his predecessor's immigration policy.

The Obama administration did not have a policy of widespread family separation, though families were detained together.

What’s more, Trump ended his administration's family separation policy amid widespread outrage and challenges in the courts — not because he thought it would be a deterrent to migrants — and his administration has continued to separate hundreds of children from their families at the southern border since announcing the end of the policy.

What will automation do to trucking jobs?

Saying the the U.S. is "in the midst of the greatest economic transformation in our history," Andrew Yang warned Wednesday that "artificial intelligence is coming" and that "it’s going to displace hundreds of thousands of call center workers, truck drivers — the most common job in 29 states."

Automation will surely affect the truck driving industry, which employs more than 3.5 million people according to the American Trucking Associations.

The U.S. Government Accountability Office released a report earlier this yearand concluded that there are two possible scenarios. The industry could see a full automation of long-haul trucking that would lead to a reduction of jobs and lower wages, or the industry may find that self-driving trucks still need operators, changing the skill set and wages of truck drivers without significantly affecting the number of jobs.

Download the NBC News app for full coverage of the second Democratic debate.

Did Biden participate in sending aid to Central American countries?

“I already proposed and passed $750 million for Guatemala, El Salvador and Honduras to be able to change the circumstances of why people fled in the first place," Biden said Wednesday night during the debate.

This is true.

Biden led the White House effort to send aid directly to the Northern Triangle countries, and a bipartisan Congress approved $750 million in funding. However, the U.S. began diverting that money in 2019.

Is decriminalizing border crossings the only way to stop family separations?

Julián Castro argued this on Wednesday when asked about his immigration plan.

"The only way that we're going to guarantee that we don’t have family separations in this county again is to repeal section 1325 of the immigration nationality act. That is the law that this president, this administration is using to incarcerate migrant parents and then physically separate them from their children," Castro said.

Section 1325 is the portion of U.S. immigration law that makes entering the U.S. illegally a criminal offense. Simply being in the U.S. without authorization is a civil offense — and people who are found to be in the U.S. without papers can be deported — but section 1325 adds a layer of criminality.

Castro is correct in his description of how the law is being used, but his overall claim isn't historically accurate. The family separation policy was introduced by the Trump administration, but Section 1325 has existed for decades without resulting in the separation of thousands of children from their families.

Is it true that one in four diabetics can't afford their insulin?

During an extended exchange on health care, Kamala Harris claimed that one in four Americans who have diabetes can’t afford their insulin.

This checks out.

A study published in the Journal of the American Medical Association in 2018 showed that one in four people with diabetes said they were rationing their insulin because it cost too much to buy the amount they needed.

Does Biden's health care plan cover everyone?

"My plan covers everyone," Biden said on Wednesday night, fending off attacks on his plan to overhaul America's health care system.

His claim is half true. While the Biden plan would provide coverage to millions who fell through the cracks in Obamacare, experts tell NBC News there’s still likely to be gaps due to affordability.

Biden’s plan expands coverage by offering new subsidies to both higher income and lower income Americans who are currently ineligible for government aid to purchase insurance. But it’s likely some Americans will still choose to forgo coverage, even with premiums capped at 8.5 percent of their annual income. Additionally, while undocumented immigrants would be allowed to buy insurance for the first time through Biden’s plan, they would not be eligible for subsidies to help pay premiums.

It’s worth noting that “Medicare for All,” Sen. Bernie Sanders’ plan, could also have similar coverage gaps with undocumented immigrants. Sanders says he wants to cover undocumented immigrants, but his bill leaves it to the Health and Human Services Secretary to determine who qualifies for coverage and to create rules preventing foreign nationals from traveling to the U.S. for government-sponsored care.

Is Amazon responsible for closing 30 percent of America's stores?

“Amazon is closing 30 percent of Americas stores and malls and paying zero in taxes while doing it,” Yang claimed during Wednesday's debate.

This is a stretch, since Amazon isn’t personally buying up stores and malls and closing them. But of course, online shopping is changing how Americans shop.

Malls are facing enormous pressure and closing rapidly. One expert told Forbes he expected roughly 30 percent of the nation’s malls would close or be repurposed over the next decade, though analysts in 2017 at Credit Suisse pegged the number of coming closures lower.

And while it’s true that the online giant doesn’t pay federal taxes, according to an analysis of corporate filings put out by the progressive think tank Institute for Taxation and Economic Policy, the review didn’t analyze state and local taxes.

Can Bill de Blasio really take credit for progressive strides in New York?

In his opening statement, de Blasio listed off a handful of accomplishments he says he got done as New York City's mayor.

“We gave pre-K to every child for free. We got rid of stop and frisk and we lowered crime. We raised the minimum wage to $15 an hour," de Blasio said.

This is all true, but some of these key wins were the result of action by Albany, not City Hall. For example, getting a $15 minimum wage in New York City for most businesses — while championed by de Blasio — was a product of a statewide roll-out of increased minimum wages.

In addition, de Blasio’s signature campaign promise back in 2013 was providing universal pre-kindergarten, and funding it with a tax for the city’s super-wealthy. He enacted universal pre-K — and it’s wildly popular — but not with a wealth tax, which Democratic Gov. Andrew Cuomo would not sign off on. Cuomo, however, found other state funds to pay for the program, which has grown to cover three-year-olds in recent years.

When it comes to crime, citywide total crimes that fall into the seven major felony offenses have consistently fallen since 2014, when de Blasio was sworn in. The overall crime rate for the month of March fell in 2019 to its lowest level for any March since 1994, according to statistics kept by the city.