When Dr. William Schaffner, an infectious disease specialist in Tennessee, flicked on the television last night to catch the end of the Republican debate, he watched a scene that felt unsettlingly familiar: A candidate was talking about vaccines and autism.  Dr. Schaffner has spent much of his career trying to debunk the contention that childhood shots can cause serious medical conditions, but he had hoped that national soul-searching this year after an outbreak of measles at Disneyland had moved the country past some of these old notions.  “I think it’s sad,” said Dr. Schaffner, a professor of preventive medicine at Vanderbilt University, who said he cringed through the autism exchange at the end of the debate. “I would have hoped, since two of the discussants were physicians, that there would have been a ringing discussion about safety and value of vaccines, and an affirmation of the schedule set out by the American Academy of Pediatrics.”  For infectious disease doctors around the country watching the exchange, it felt a little bit like “Groundhog Day.” In 2011, during the last election cycle, Michele Bachmann, at the time a leading Republican candidate, called the vaccine to prevent cervical cancer “dangerous,” setting off a controversy that damaged the image of vaccines and set back doctors working to promote them as safe.  This time, it was Donald J. Trump who vigorously asserted a connection between vaccines and autism, telling an emotional story of an employee whose “beautiful” baby fell ill with a fever after having a vaccine and, he said, became autistic. While the two candidates who are doctors — Rand Paul, an ophthalmologist, and Ben Carson, a retired neurosurgeon — said that childhood vaccines were safe and important, even they shied away from the strict schedule set out by the medical profession.  “We have extremely well-documented proof that there’s no autism associated with vaccination, but it is true that we are probably giving way too many in too short a period of time,” Mr. Carson said. “I think a lot of pediatricians now recognize that and are cutting down on the number and the proximity in which those are done.”  Mr. Paul agreed. “One of the greatest medical discoveries of all time were vaccines,” he said. “I’m for vaccines, but I’m also for freedom. Even if the science doesn’t say bunching them up is a problem, I ought to be able to spread my vaccines out a little bit, at the very least.”  Doctors watching the debate were despairing.  “I was thinking: There’s a reason why we have a schedule,” said Dr. Saad Omer, an infectious diseases expert at Emory University in Georgia. He watched the beginning of the debate, then stopped to do work, but ran back in to turn it on again when some vaccine expert friends started posting on Facebook about the back-and-forth on the stage.  “I had hoped was there would have been a stronger endorsement of the schedule,” he said. “It’s not one person’s opinion. It’s not even just the government’s opinion. It’s based on very broad scientific advice.”  Still, the endorsement by Mr. Paul and Mr. Carson of delaying vaccines is in keeping with what many pediatricians and family physicians reluctantly do behind closed doors. If parents demand an alternative schedule, physicians often agree to postpone one or more vaccinations. A recent survey of a nationally representative sample of 534 primary care doctors found that a third said they “often” or “always” allowed parents to delay vaccinations or space them out.  The downside is that this leaves children vulnerable to potentially fatal infections like measles and whooping cough.  “When you delay vaccines, you increase the period of time in which you are susceptible to those diseases,” said Dr. Paul A. Offit, a pediatrician specializing in infectious diseases at the Children’s Hospital of Philadelphia. “We are seeing the effects of that. The outbreak we saw this year in Southern California was among parents who had chosen to delay or withheld vaccines for their children.”  In a bit of political jockeying, Mr. Carson suggested at the debate that only vaccines that “prevent death or crippling” were very important. “There are a multitude of vaccines which probably don’t fit in that category, and there should be some discretion in those cases,” he said.  But of the 14 preventable diseases that young children are vaccinated against, Dr. Offit said, “the only one you could reasonably say does not kill is mumps.” And mumps can cause permanent deafness and sterility in men after puberty, he said. The other 13 diseases can be deadly. “Tetanus kills, rubella kills unborn children, measles kills, hepatitis B virus kills,” Dr. Offit said.  He lamented, “Why is it that everyone on that stage got vaccines wrong last night?”  A version of this article appears in print on September 18, 2015, on page A20 of the New York edition with the headline: G.O.P. Vaccine Debate Has Doctors Despairing . Order Reprints| Today's Paper|Subscribe
Donald J. Trump repeated a debunked claim that vaccines are linked with autism, and health experts worried it might discourage parents from getting them.