New York Mayor Bill de Blasio during a break in the Democratic debate hosted by CNN on Wednesday in Detroit. (Paul Sancya/AP)
Opinion writer

Do Democratic presidential candidates think they can win a Democratic primary by attacking Barack Obama? Many of them spent a lot of time doing just that at Wednesday night’s presidential primary debate. And in doing so, they gave former vice president Joe Biden an opportunity to defend the president he served. The result was a stronger performance that helped Biden recover from a shaky first debate in June.

When the moderators brought up the fact that Obama deported hundreds of thousands of immigrants, former housing and urban development secretary Julián Castro lit into Biden, declaring: “Mr. Vice President, it looks like one of us has learned the lessons of the past and one of us hasn’t.”

New York Mayor Bill de Blasio piled on, demanding “Vice President Biden, I didn’t hear your response when the issue came up of all those deportations. You were vice president of the United States. I didn’t hear whether you tried to stop them or not, using your power, your influence in the White House.”

Biden responded by pointing out that it is “bizarre” to criticize Obama on immigration when he pushed for comprehensive reform and brought the “dreamers,” whose parents brought them to the United States as children, out of the shadows — and, by the way, to do so when Donald Trump is president.

The candidates’ discussion on health care was similarly defined by criticism of the public-private system Obama built. Rep. Tulsi Gabbard (Hawaii) railed that “the core of this problem is the fact that big insurance companies and big pharmaceutical companies who’ve been profiting off the backs of sick people have had a seat at the table, writing this legislation.” The Affordable Care Act has saved countless lives and enabled millions to live with more financial security. But, apparently, anything short of revolution is selling out.

Biden’s response was simple: “Obamacare is working. The way to build this and get to it immediately is to build on Obamacare.”

On criminal justice, de Blasio was at it again, trying to blame Obama and Biden for the fact that the Trump Justice Department just declined to prosecute the police officer who killed Eric Garner. “Mr. Vice President, tell us, what did you do to try and spur on the Justice Department to act in the Garner case?” de Blasio asked.

Biden responded by pointing out that the Obama administration pushed for police department reform, funded police body cameras and released 38,000 people serving harsh sentences in federal prison.

Attacks such as these don’t make Democratic candidates more intellectually credible. They don’t show leadership skills. They just help Biden — and maybe even Trump. These criticisms give Biden organic chances to tie himself ever-tighter to Obama, the nation’s first black president and the best human being to inhabit the Oval Office since George H.W. Bush. But they also provide talking points for a president determined to denigrate his predecessor and to diminish his legacy by any means possible.

Obama made mistakes. But it could be that the alternatives de Blasio and others propose wouldn’t actually have been better. It is also the case that Obama couldn’t do everything he wanted to do; despite the fevered imaginations of conservative conspiracy theorists at the time, he was no dictator.

All Biden has to do is point out these considerations. Calling out others for lack of ideological purity and displaying no awareness of the limits the American system imposes on its political leaders or the trade-offs inherent in governing make Biden’s competitors look naive.

Democratic candidates should not alienate the former supporters of the most successful Democratic candidate since Lyndon B. Johnson in 1964. They should argue that they would do a better job building on that legacy than Biden would.

Read more:

Paul Waldman: Yes, Democrats should criticize Barack Obama. Here’s why.

Dana Milbank: Joe Biden was adequate. That’s a victory.

Jennifer Rubin: Biden performed better in his second debate. CNN didn’t.

Alyssa Rosenberg: I’m grateful for every single woman running for president. Even Marianne Williamson.

Ann Telnaes: Sketches of the CNN Democratic debate

Erik Wemple: Protesters spice up CNN debate

Drew Altman: The Democratic debates suffer from a nasty case of Plan-itis