(CNN) The skills Kamala Harris honed during her years as a prosecutor will once again put her in the spotlight when she takes the stage on Wednesday for CNN's Democratic presidential debate in Detroit .

Harris' argument that she can " prosecute the case " against Donald Trump is at the core of her bid for the Democratic nomination, and the California senator will once again try to use the debate stage to prove that her years in the courtroom have readied her to spar with the President in a general election matchup.

Aides who have worked with her over the years note that she has methodically prepped for these moments -- either on the debate stage or in a US Senate hearing room -- by diving into her briefing books, and then working her way down to an outline of each issue as she crafts what she thinks would be the most effective argument.

Harris often presses her team to help her anticipate her opponent's arguments -- or the potential holes in the testimony of her witnesses.

She shows a touch of superstition by always making sure there is pizza during debate prep, because that's been her team's tradition throughout all of her campaigns. After the debates, one aide recalled that she buys the first round of drinks for staff members who helped her prepare, even if she heads out early to bed.

Longtime confidantes Debbie Mesloh and Suzy Loftus note that meticulous preparation comes in part from the influence of her mother, who was a scientist and breast cancer researcher. Loftus and Mesloh, who both worked with Harris when she was a prosecutor in California, said the Democrat always wanted to make sure the team would "do the math" on why her proposals might work better than those of her opponents so she was ready to counter their arguments.

That instinct to carefully think through her answers has sometimes tripped her up in the lightning fast arena of 2020 presidential politics. She was criticized after her April CNN town hall with Jake Tapper for not having a ready answer on several policy questions. She sidestepped a question about felon voting rights, for example, by saying, "I think we should have that conversation."

Harris has also been chided for being difficult to pin down on policy questions like whether she would do away private health insurance as part of her support for "Medicare for All." She clarified that point when she released her Medicare for All plan Monday morning, with private plans being phased out over time.

After all that strenuous preparation, California's junior senator made it a point to build in some time away from the briefing books while in the Motor City, heading out for a date night with her husband Douglas Emhoff to see MAXWELL at The Aretha amphitheater on Detroit's riverfront.

Hinting at either her sweet tooth or pre-debate nerves, the candidate appeared to be arming her team for long nights this week -- ordering an entire lemon velvet cake and one of every kind of pound cake, along with an iced caramel mocha latte, from a Detroit cake shop she visited on Monday.

When asked about her mission for CNN's debate in Detroit this week, she laughed.

"To not mess up," she said.

That was not a problem in the first primary debate for the former district attorney of San Francisco -- who prosecuted crimes like rape, homicide, battery and assault in the early days of her career in Alameda County -- as she took command of the stage early in Miami , winning applause when she admonished the other candidates not to allow the forum to turn into "a food fight."

She was calm, controlled and unflustered. With the audience as her jury, she wove her personal story so effectively into her critique of former Vice President Joe Biden's record opposing desegregation busing that he looked almost crestfallen, and abruptly broke off his answer by saying his time was up.

Like previous presidential candidates who were practiced in executing their arguments before judges and juries -- former New Jersey Gov. Chris Christie and former North Carolina Sen. John Edwards are prime examples -- there is no question that Harris' courtroom experience has given her an advantage in forums where there are nearly a dozen Democratic candidates on stage.

Harris' former colleagues and friends have watched these debates and her prosecutorial interrogations in the Senate with a sense of anticipation, knowing that she is trained to excel in this arena.

Loftus, a prosecutor who worked with Harris both while she was district attorney of San Francisco and attorney general, noted that some Americans watched in surprise as her former boss picked apart witnesses during Senate hearings. But Loftus knew better, saying that Harris' methodical questioning style had been honed by years in the courtroom.

"A prosecutor's training is to be prepared and know the answer to every question before it's asked," said Loftus, who is now running to be the district attorney of San Francisco.

While watching Harris interrogate Attorney General William Barr , then-Attorney General Jeff Sessions and then-Supreme Court nominee Brett Kavanaugh , Loftus remembered facing that same skeptical gaze and unsparing questioning from Harris.

"She's intense to be questioned by," Loftus said. "I've been on the other side of being questioned by her, so there's an aspect of sympathy or empathy I have for some of them. The truth is, she's also supremely fair, but you're not going to get away with hedging or equivocating."

Aggressively challenging Biden, the Democratic front-runner, in the first debate was a risky gambit for Harris, but it paid off. She benefited not only from the element of surprise, but also that Biden seemed totally unprepared to defend his own record.

But now Harris enters the second debate with the added pressure of matching that first debate performance. Biden is clearly eager to move beyond his shaky performance, as many Democratic voters wonder whether he's up for the challenge of facing Trump or if he's gotten too soft, as several voters put it in recent interviews.

"People look at these debates like gladiator contests -- they're trying to find out who the best person is," said Brett O'Donnell, a veteran Republican debate coach who said Harris clearly had the best performance of any of the Democrats over the course of two nights in Miami last month. "Aggression is good because it's used to judge who their champion is. The Democratic Party wants to win, so they are looking for the person who can go into the arena with Donald Trump."

The ability to counter-punch is particularly important to Democrats this cycle because party activists watched so many traditional Republican candidates crumble under Trump's attacks during the 2016 primaries, and as his eventual Democratic opponent Hillary Clinton struggled to get her message through the bluster and bravado that defined Trump's campaign.

The importance of the Harris-Biden exchange in Miami -- though it only took a few minutes -- was evident in a weeks-long surge following the debate, when Harris saw a jump in both in her poll numbers and in donations to her campaign.

"Trump is so unconventional and he's very aggressive in debates," O'Donnell said. "The Democrats saw what happened to those other Republicans on the stage when they tried to stay conventional, and I think they know they've got to have someone who is going to be able to break through that convention and go toe-to-toe with Donald Trump."