The quip elicited cheers from some in the audience at Upper Moreland High School, and moderator Larry Kane remarked that it "was a punch to the groin."
The tiff also underscored the increasing vitriol in a primary race that will likely decide on Tuesday the next U.S. representative for the heavily Democratic portions of eastern Montgomery County and Northeast Philadelphia.
The race was once deemed a slam-dunk for Margolies, who runs an international foundation for women and whose supporters include Bill and Hillary Rodham Clinton. (Their daughter, Chelsea, is her daughter-in-law.) But political experts have recently said the race is wide open.
Margolies also came under fire during the debate over a fund-raiser scheduled for Thursday at the Manhattan home of Lynn Forester de Rothschild, chief executive of the E.L. Rothschild investment firm and a longtime Hillary Clinton supporter. Rothschild, a British baroness, backed Republican John S. McCain in the 2008 election, saying the Democrats had gone too far to the left. Clinton is expected to headline the fund-raiser.
The other two contenders to replace U.S. Rep. Allyson Y. Schwartz, who is running for governor, are State Rep. Brendan Boyle and physician Valerie Arkoosh. None of the four escaped criticism.
Arkoosh was rebuked for receiving support from an anesthesiologists' political action committee that opposed the Affordable Care Act, although she said didn't solicit the support.
Boyle was blasted for supporting bills that strengthened regulations on abortion providers, one of which led to the closure of several Pennsylvania clinics. He reiterated his pro-choice stance.
Boyle, who at one point pulled back from the wrangling, said: "You actually have four bright, hardworking people on stage. And one of us is going to be the next member of Congress."