Jeff Yang is a frequent contributor to CNN Opinion, a featured writer for Quartz and other publications, and the co-host of the podcast "They Call Us Bruce." He co-wrote Jackie Chan's best-selling autobiography, "I Am Jackie Chan" and is the editor of three graphic novels: "Secret Identities," "Shattered" and the forthcoming "New Frontiers." The opinions expressed in this commentary are his. Read more opinion articles on CNN.

(CNN) For Kamala Harris, this second Democratic debate was a vital opportunity to put her campaign back on course. Instead, she ran aground on questions about the very role she sought to put in the spotlight: Her six-year stint as California's Attorney General.

Jeff Yang

Harris saw a major spike in the polls after she went on the offensive in the first debate, attacking former Vice President Joe Biden over his '70s-era opposition to federally mandated busing as a means to fight segregation. The energetic takedown briefly sent Harris soaring past rivals Elizabeth Warren and Bernie Sanders in the polls, putting her within two points of frontrunner Biden in a July 2 Quinnipiac Poll . But the bump didn't last, and her numbers fell back to Earth during the month between the first and second debates.

On Wednesday night, she unveiled a fresh strategy to recover her mojo: Leaning into her prosecutorial past. After all, she'd earned viral attention for her ability to shrewdly interrogate and cross-examine Brett Kavanaugh during his confirmation hearings and US Attorney General William Barr during his testimony on the Mueller Report. It seems clear that her team advised her to play to those strengths, beginning with her opening statement, in which she promised to "successfully prosecute the case of four more years of Donald Trump."

The new positioning may have addressed criticisms that Harris hasn't been able to broadcast a core message that sums up her unique identity as a candidate, akin to Warren's "I Have a Plan For That," Sanders' "We Need a Revolution" and Buttigieg's "New Generation of Leadership." But dubbing herself the "Prosecutor-In-Chief" was a risky, go-for-broke choice: It jostled with Biden's central argument ("I'm the Fighter Who Can Take on Trump.") More importantly, it made her vulnerable to long-simmering criticisms of her criminal justice record as AG, which may explain why support among black voters and millennials -- who frequently deride her as a "cop" -- stands at just 7% and 5%, respectively.

So it was likely that someone on stage would be prepared to take advantage of that vulnerability. What was surprising was the direction from which it came: Tulsi Gabbard, whom Harris had dismissed earlier that night in an exchange over healthcare.