The two-hour debate is unfolding in a moment of economic uncertainty for New York City, and against a backdrop of a spike in gun violence.For many months, the most consequential New York City mayor’s race in a generation has been overshadowed by a pandemic, upheaval in Washington and political burnout in the aftermath of the presidential election.Now, the mayoral candidates are racing to take advantage of what they hope will be their turn in the spotlight.On Thursday, with less than six weeks before the June 22 Democratic primary that is likely to determine the next mayor, eight Democratic contenders will have their most significant opportunity yet to introduce themselves and to capture voter attention, as they convene by video for the first of three official primary debates.The two-hour debate, co-hosted at 7 p.m. by Spectrum News NY1, is unfolding at an inflection point for a city, a period marked by both economic uncertainty and the reopening of businesses, a spike in gun violence and a surge of hope around vaccinations. The election will play a crucial role in determining whether the city retains its standing as a cultural and financial capital of the world in the pandemic’s aftermath.In many ways, the race is unsettled. Left-wing activists and voters who have been decisive in other recent New York races are divided over how to wield their influence, after the city comptroller, Scott M. Stringer — a leading progressive candidate — was accused of sexual assault. He denied the allegation, but it sapped his momentum, and many high-profile endorsers have dropped their support for him.The city comptroller, Scott Stringer, is struggling to hold onto progressive support after a sexual-abuse allegation from 20 years ago hurt his campaign.Sarah Blesener for The New York TimesSparse public polling suggests that Andrew Yang, the former presidential candidate, and Eric Adams, the Brooklyn borough president, are the top-tier contenders, with other candidates strategizing around how to cut into their leads.For the rest of the field, time is running short to break out of the pack, and the debate represents the best chance yet to communicate with voters who are just beginning to tune in.“The debate is very important because it gives voters the opportunity to really compare and contrast, to get a sense of all of us next to each other,” said Kathryn Garcia, the former city sanitation commissioner who has been one of the lower-polling candidates, but has attracted fresh interest from some Democrats following an endorsement from The New York Times editorial board.The virtual format may limit opportunities for fireworks and breakout moments, but candidates have nevertheless been preparing for this moment for weeks, poring over policy briefings, huddling with advisers over video chats and in person and doing full-on mock debates.Mr. Yang, who is experienced on the presidential debate stage but new to the front-runner’s spotlight, has participated in mock debate sessions with several high-profile stand-ins, as his team braces for an onslaught of attacks.A former mayoral rival, Carlos Menchaca, a city councilman who has endorsed Mr. Yang, has played Dianne Morales, the left-wing former nonprofit executive; Representative Ritchie Torres, a New York Democrat, has played Mr. Adams; Assemblyman Daniel Rosenthal of Queens has been a stand-in for Mr. Stringer; and Sasha Ahuja, Mr. Yang’s co-campaign manager, has played Maya D. Wiley, according to someone familiar with Mr. Yang’s debate preparations.Mr. Yang will take the virtual stage as he deals with controversy tied to a statement he made this week of unqualified support for Israel, remarks he sought to modulate on Wednesday amid an outcry on the left and pushback from some of his own volunteers and staff.For Mr. Yang, who has generally led the available polls since he entered the race in January, the debate will test his ability to weather the kind of sustained scrutiny that he never faced onstage as a low-polling presidential candidate, and his opponents have already previewed attacks on his experience and his ties to the city’s civic fabric.Eric Adams, the Brooklyn borough president, is thought to be one of two front-runners in the New York City mayor’s race.Elizabeth D. Herman for The New York TimesMr. Adams has held mock debates, too, with advisers playing the role of his opponents and the moderator. As he has risen in some polls, a number of candidates have increasingly sought to draw overt contrasts with him, a dynamic that is likely to continue onstage, reflecting his standing in the race.Raymond J. McGuire, a former Citi executive, has practiced, with the help of a team of advisers, from his Upper West Side apartment. Ms. Garcia has been peppered with questions from staff members and consultants, “timing me and being like, ‘you’re over a minute, you’re under a minute,’” she said. Shaun Donovan, the former federal housing secretary, has sought to simulate as many of the debate conditions as possible, rehearsing over video in the evenings.“When the story of this campaign is written, this is going to be one of the first things regular voters ever heard about,” said Joshua Karp, a Donovan adviser who said he ran debate prep for Senator Jon Ossoff of Georgia and the Democratic National Committee chairman, Jaime Harrison, during Mr. Harrison’s South Carolina Senate bid.There is a debate planned for May 26 for the two Republican candidates, Curtis Sliwa, the founder of the Guardian Angels, and Fernando Mateo, a restaurant operator who has led or founded Hispanics Across America, the state Federation of Taxi Drivers and United Bodegas of America..css-1xzcza9{list-style-type:disc;padding-inline-start:1em;}.css-3btd0c{font-family:nyt-franklin,helvetica,arial,sans-serif;font-size:1rem;line-height:1.375rem;color:#333;margin-bottom:0.78125rem;}@media (min-width:740px){.css-3btd0c{font-size:1.0625rem;line-height:1.5rem;margin-bottom:0.9375rem;}}.css-3btd0c strong{font-weight:600;}.css-3btd0c em{font-style:italic;}.css-w739ur{margin:0 auto 5px;font-family:nyt-franklin,helvetica,arial,sans-serif;font-weight:700;font-size:1.125rem;line-height:1.3125rem;color:#121212;}#NYT_BELOW_MAIN_CONTENT_REGION .css-w739ur{font-family:nyt-cheltenham,georgia,’times new roman’,times,serif;font-weight:700;font-size:1.375rem;line-height:1.625rem;}@media (min-width:740px){#NYT_BELOW_MAIN_CONTENT_REGION .css-w739ur{font-size:1.6875rem;line-height:1.875rem;}}@media (min-width:740px){.css-w739ur{font-size:1.25rem;line-height:1.4375rem;}}.css-1dg6kl4{margin-top:5px;margin-bottom:15px;}#masthead-bar-one{display:none;}#masthead-bar-one{display:none;}.css-12vbvwq{background-color:white;border:1px solid #e2e2e2;width:calc(100% – 40px);max-width:600px;margin:1.5rem auto 1.9rem;padding:15px;box-sizing:border-box;}@media (min-width:740px){.css-12vbvwq{padding:20px;width:100%;}}.css-12vbvwq:focus{outline:1px solid #e2e2e2;}#NYT_BELOW_MAIN_CONTENT_REGION .css-12vbvwq{border:none;padding:10px 0 0;border-top:2px solid #121212;}.css-12vbvwq[data-truncated] .css-rdoyk0{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}.css-12vbvwq[data-truncated] .css-eb027h{max-height:300px;overflow:hidden;-webkit-transition:none;transition:none;}.css-12vbvwq[data-truncated] .css-5gimkt:after{content:’See more’;}.css-12vbvwq[data-truncated] .css-6mllg9{opacity:1;}.css-1rh1sk1{margin:0 auto;overflow:hidden;}.css-1rh1sk1 strong{font-weight:700;}.css-1rh1sk1 em{font-style:italic;}.css-1rh1sk1 a{color:#326891;-webkit-text-decoration:underline;text-decoration:underline;text-underline-offset:1px;-webkit-text-decoration-thickness:1px;text-decoration-thickness:1px;-webkit-text-decoration-color:#ccd9e3;text-decoration-color:#ccd9e3;}.css-1rh1sk1 a:visited{color:#333;-webkit-text-decoration-color:#ccc;text-decoration-color:#ccc;}.css-1rh1sk1 a:hover{-webkit-text-decoration:none;text-decoration:none;}The debate among the eight Democratic candidates who met the threshold to participate will take place less than a week after a shooting in Times Square, and the contenders are almost certain to engage one another over matters of public safety and the power of the police.Mr. Adams, Mr. Yang and Mr. McGuire all rushed to Times Square in the aftermath of the shooting, speaking soberly about gun violence and crime, even as they have also stressed their support for reforming policing. Other more left-wing candidates have kept their focus more squarely on matters of police accountability. And on Tuesday, Ms. Garcia, Ms. Wiley and Mr. Donovan all held events discussing gun violence and policing.Mr. Adams, a former police officer who pushed to change Police Department policy from within the system, has made public safety a centerpiece of his campaign — the “prerequisite” to prosperity, he often says.In a sign of one possible line of interrogation to come, Mr. McGuire wrote on Twitter on Wednesday: “I guess my question for the cop-turned-career politicians is: in all that time, what have you done?”Then there is the contest for the left wing of the party.Mr. Stringer had appeared on the cusp of coalescing progressive organizations and leaders around his campaign until about two weeks ago, when Jean Kim, an unpaid worker on his 2001 public advocate race, came forward with allegations of unwanted sexual advances. Mr. Stringer has strongly denied the allegations, but the accusation threw Mr. Stringer’s campaign into turmoil. Many of his most high-profile left-wing endorsers, who had been a central part of Mr. Stringer’s pitch, abandoned him, despite seeing him as the most viable of the left-leaning contenders.The controversy surrounding Mr. Stringer has given room for other left-leaning candidates like Maya Wiley, center, and Dianne Morales.Sarah Blesener for The New York TimesThe Working Families Party, which had supported Mr. Stringer as its first choice, is now backing Ms. Morales and Ms. Wiley. Some on the left have also made joint endorsements, while others will be watching the debate closely to decide whether to do a joint endorsement, to elevate one contender over the other in a ranked-choice endorsement or to sit out the endorsement process entirely.“You have a splintering of support among the people who would otherwise maybe coalesce around a single candidate,” said Susan Kang, a steering committee member of the New York City chapter of the Democratic Socialists. “It seems, to me, very fractured.”Mr. Stringer, however, is a well-funded candidate and an experienced debater who is receiving both political backing and air cover from powerful teachers’ unions and may continue to hold onto his Upper West Side base despite losing prominent left-wing endorsers.“One of the things I think will be clear in this debate is, we cannot have a mayoralty on training wheels when we’re in our biggest challenge,” Mr. Stringer said on Wednesday.As for his debate preparations?“Top secret,” he said. More