My reaction to the debate is that McCain owned Obama on foreign policy. On that issue, the thing was an old fashioned rout. There were times at which Obama hinted at a good job of defending a less muscular - a European - foreign policy, but didn't extend the argument. I suspect he knows that he's got the votes of people who believe in that type of thing and, historically, it's a tough stance from which to win a federal election.
So he tried to talk tough, but was waxed. His position on Iraq is incoherent. When the war was going badly, he wanted, notwithstanding the consequences, to bail, arguing that victory was not possible. Now that he can no longer argue that victory is not possible, he still wants to bail because, near as I can tell, he thinks we should have left Saddam in power and he wants to use the money elsewhere. What he doesn't understand (as McCain repeatedly put it) is that defeat in Iraq would destabilize the middle east and embolden al-Qaeda and its allies who chose to make Iraq a battleground. Even the Iraq Study Group recognized that. To try and change that subject by saying that the war should not have been fought in the first place is senseless. Neither John McCain or Barack Obama get to change that decision.
(And,of course, if we manage to establish a friendly Muslim democracy in the middle east, the war will have accomplished something extremely important.)
On Iran, he seemed to want to run away from his earlier willingness to engage in Presidential-level negotiations without preconditions, suggesting that wasn't what he meant. But he couldn't quite bring himself to make that clear.
All of this effects the way in which his position on Afghanistan came across. Does anyone really believe that Barack Obama will follow bin Laden into his cave? McCain underscored his advantage by chiding Obama for his statement that he would invade Afghanistan. ("You don't say that out loud. If you have to do things, you have to do things ....")
But will this help McCain in the polls? One view is that Obama simply needed to avoid embarrassment. He needed to avoid a moment that could be easily spun into a harmful post-debate narrative. I think he did that - particularly in light of the fact that, given the friendly press, an Obama gaffe or McCain knockout would have to be very obvious. He knows that, if this becomes a foreign policy election, he's not going to win and one way to prevent it from being a foreign policy election is to avoid a bad mistake. That was accomplished and I think early responses reflect that.
There are, I think, reasons to be very concerned about an Obama presidency in the international realm but that is tough case to make to voters who do not attend to such matters and are, in any event, more focused on the economy.