Northern Virginia Rep. Stanford E. Parris (R) and his Democratic opponent, Herbert E. Harris II, staked out similarly hawklike positions on United States foreign policy during a debate last night.

The two, running against each other for the third time in their political careers, engaged in one of their most freewheeling debates so far in front of 500 students and voters at western Fairfax County's Robinson High School. They spent most of the evening trading familiar gibes on the economy, with Harris accusing Parris of helping bring about a recession and Parris accusing Harris of favoring Social Security benefits for incarcerated felons and other "Great Society programs." Each candidate denied the other's accusations.

The candidates did not disagree, however, on U.S. relations with the Soviet Union. Harris, who unlike many Democratic congressional candidates does not support a freeze on the production of nuclear weapons, called for the renewal of an embargo on selling grain to the Soviet Union.

"We have sat back and permitted this type of thing to go on without making any kind of strong reaction to it," the 56-year-old former congressman said in response to a question about the alleged Soviet use of chemical weapons. "I do not believe that after the Soviet Union has invaded Afghanistan, after it has used chemical weapons on human beings, that we should send them food to help their economy."

Parris, a 53-year-old Republican, did not discuss the food embargo, which was opposed by President Reagan after he was elected, but he strongly attacked the nuclear weapons freeze proposal. "It is time that America stood up and acted like America and negotiated from strength, in chemical capabilities, in nuclear weapons and in conventional weapons of any kind," he said.

Austin Morrill, 33-year-old Citizens Party candidate, said he supports a verifiable, bilateral nuclear weapons freeze and urged a "productive dialogue" with the Soviet Union. As the other candidates discussed the economy, Morrill asked, "What good is your retirement going to be, or your COLA (cost of living adjustment) benefit or something like that if you're leveled in a nuclear holocaust?"

The young audience applauded loudly for each candidate and hooted with enjoyment when they attacked one another.