The race's outcome could help determine which party controls the Senate.
The debate Monday night also touched on allegations that Allen used racial slurs in the past and on a 1979 magazine article in which Webb — former Navy secretary under President Reagan — argued that women are not fit to command men in battle.
The most heated exchange centered on taxes during a portion of the debate in which candidates were allowed to ask each other questions. Allen said he has supported tax cuts that Webb has criticized.
Webb said tax cuts during a time of increased federal spending and a growing deficit are unwise.
On foreign policy, Webb called for a "diplomatic solution" to the war in Iraq while Allen stuck by his support of President Bush's strategy.
During the debate, Allen dismissed as "baseless allegations" by some of his former University of Virginia football teammates that in the 1970s he freely used an epithet to describe black people. He urged people to look at his record on race, including his efforts to help historically black colleges and universities.
Asked about his 1979 Washingtonian magazine article, "Women Can't Fight," Webb said he is now comfortable with the role of women in the military.