But there's also a rough consensus: Combating terrorism is important, but the war in Iraq is weakening the United States and the next president should exert more diplomacy and less military muscle.
"The current security policy -- with its excessive reliance on unilateral force, its rejection of international agreements of all kinds, and its preference for policy-making based on ideology, not evidence -- has to change," Clinton, the party's front-runner, said in a speech last month.
Still, the Democrats have arrayed themselves on a clear foreign policy spectrum, with Clinton, who emphasizes military strength, closest to the center of the electorate; former North Carolina Sen. John Edwards, who has said "The war on terror is ... a bumper sticker, not a plan," on the left; and Obama somewhere between the two.
Clinton talks about terrorism as a priority, and she was the last of the three leading Democratic candidates to turn against the war in Iraq.
Obama also talks about terrorism, but puts his emphasis more strongly on diplomacy -- leading to his statement in last week's debate that he was willing to meet with the leaders of Iran, Syria, North Korea or Cuba without preconditions. That was the position Clinton called "naive."
Despite such disagreements, though, Clinton and Obama both voted this month in favor of a measure to force Bush to remove combat troops from Iraq by April. (The measure was blocked.)
"They're not all that far apart," said Stephen Bosworth, a former State Department official who is now dean of the Fletcher School of Diplomacy at Tufts.
Edwards, by contrast, has staked out distinct positions on both Iraq and terrorism. He has called for an immediate withdrawal of at least 40,000 troops from Iraq, and a complete withdrawal within a year. And he has said it is time to abandon the idea of a "war on terror."
"The worst thing about the global-war-on-terror approach is that it has backfired -- our military has been strained to the breaking point and the threat from terrorism has grown," he said in a May speech.
He continued: "By framing this as a 'war,' we have walked right into the trap that terrorists have set -- that we are engaged in some kind of clash of civilizations and a war against Islam."
According to Mandelbaum, "Whichever Democrat wins the nomination is going to have to move a little bit toward the center in the general-election campaign."
Clinton will have "the least distance to move," he said.
"She appears to be running a general-election campaign already."
The nuances of Clinton's position on Iraq do not appear to have weakened her appeal to antiwar liberals by much. The Times/Bloomberg poll found her leading among liberals with 51%, compared with 27% for Obama and 18% for Edwards.
How these crosscurrents play out in the general-election campaign next year depends largely on a factor none of the candidates can control: the state of affairs in Iraq.
Democrats are likely to continue blaming Republicans for the costs of the war, no matter what. But if a U.S. withdrawal from Iraq has begun, Republicans may be tempted to declare the war resolved and try to change the subject to terrorism.
"There is one issue on which the Republicans still enjoy an advantage, and that is the larger war on terrorism," Campbell said. Republican candidates have accused Democrats of being weak on defense "since 1948," he said.
"Despite Bush's unpopularity, I don't think the Democrats have this walking away," said Terry L. Deibel, a foreign policy scholar at the Defense Department's National War College. "If a withdrawal begins in Iraq by next summer, it's possible that things could go south very dramatically.
"Depending on what the pictures on the TV screen are next October, it might not be too comfortable for Democrats."
Underneath today's bitter debate, paradoxically, there are some points of agreement between the two parties.
"Right now we're in the campaign season, and that tends to produce polarization," said Campbell. "Once we get past the election and reach the governing phase, I believe there will be substantial consensus around many issues including our alliances, the need for a strong military, and importance of backing up diplomacy with military force."
For example, he noted, most of the candidates, Democrats as well as Republicans, have called for increasing the Army and Marines by 92,000 or more people.
One other point of consensus: No candidate has taken up Bush's challenge to spread democracy across the Muslim world as a central goal for U.S. foreign policy.
"The Bush experiment is over, for now at least," said Mandelbaum. "It's been buried in the sands of Iraq."