Four months after they began running for Virginia attorney general Democrat Edward E. Lane and Republican J. Marshall Coleman seemingly have latched on to a new issue: what the office of attorney general ought to bet.

Although the candidates say their differences should have been apparent from the outset, it is only in the past two weeks that the question had surfaced as one of the key issues in their increasingly bitter race. At stake, both candidates say, the future of Virginia's major consumer protection efforts and what has become one of the most powerful offices in state government.

"It is apparent that my opponent and I have a total difference of opinion on how the office should be run," Coleman told an Arlington business group last week. Paul Goldman Lane's campaign manager, echoed Coleman in a Richmond interview: "There are nowtwo conceptions of what the office is and that has become a major issue in the race."

The differences that have emerged in recent days have come in pointed exchanges that have seen the usually reserved Lane, a 53-year-old member of the House of Delegates from Richmond, charge Coleman with "mudslinging," "talking out of both sides of his mouth," and "the new negativism." Retorted Coleman, a 35-year-old, razor-tongued state esnator from Staunton: "I have a name for this technique: 'the new demagoguery."

Beneath this war of words, inflamed during the state's only televised political debate this fall, is a sharp disagreement over what the state's next attorney general should do - and how he should do it.

There is no dispute that next to the governorship, the $45,000-a-year job has become the second-most important office in the state, and one of the most important political stepping-stones in Virginia. The man who wins it Nov. 8 will have a running start for his party's nomination for governor in 1981, party officials agree.

Both candidates in recent days have paid homage to former Attorney General Andrew P. Miller, the man who is credited with remaking the office from that of a caretaker agency into one with activist lawyers and consumer advocates.

Each candidate claims that he alone will continue Miller's activist tradition, opposing utility rate increases and suing businessmen to protect consumers.But in the television debate, Lane hedged his promise to take businessmen to court, saying he believed businessmen, too, needed to be protected from "unwarranted" governmental action.

Unlike Miller or his interim successor, Anthony F. Troy, Lane said he would not sue businessmen until after he had first discussed the case with their lawyers. Coleman's supporters claim that stance supports their view that Lane would not vigorously protect consumers.

Coleman's staff has widely distributed copies of an Aug. 12 letter written by a Virginia Automobile Dealers Association official. The official assures one dealer in the letter "that Ed would not be an activist type of attorney general such as we have had in the last few years." Several major car dealers, upset by a recent suit against 17 Oldsmobile dealers filed by Troy, are among Lane's major financial backers, the Coleman supporters note.

Lane, who long has been considered one of the favorites of Richmond's conservative business establishment, has countered that Coleman's announced plans to lop off nine members of the attorney general's staff of 90 lawyers would "cut the muscle" out of its four-member consumer staff. "I want to make (the consumer staff) bigger," Lane told a Richmond audience this week.

In recent days, Lane has produced Troy, Miller, and former Attorney General Frederick T. Gray, now a state senator, to endorse his candidacy. Each has praised Lane's record on consumer issues - the same record that Coleman increasingly is attacking.

"My opponent has not showed an interest in consumer protection until this year," Coleman said in Arlington last week. He has cited as examples Lane's votes aginst three bills designed to prevent a recurrence of the Kepone pesticide pollution of the James River. All the bills were supposted by Republican Gov. Mills E. Godwin, Coleman has said. Godwin, in a break with his party, is supporting Lane.

One reason for the strong push both candidates are now making on consumer issues is the belief that they could be crucial to winning votes in the populous Washington suburbs, a region that Coleman considers vital to cut Lane's expected heavy margins around Richmond and in the conservative Southside. Those areas provided Lane with the margin of his Democratic primary victory in a four-way race last summer and are now virtually conceded to Lane by some members of Coleman's staff.

Coleman, zipping in and out of Northern Virginia in a cream-colored Ford (borrowed, ironically, from an auto dealer who is supporting him), continually stressed his promise to do what Miller and his staff constantly did when the legislature was in session: lobby for new laws affecting the state's criminal justice system, the office of attorney general and state agencies. To avoid "confronting" the legislature on such proposals is to "be doing only half the job . . . just taking up space" in the state bureaucracy, Coleman said in a Washington television interview this week.

On this point, Lane, who rarely spoke in the legislature without a prepared text, bristles and the words tumble from his mouth in a staccato. That Coleman promise is tantamount to "lobbying for social issues . . . and I say that's wrong," Lane said, his arms cutting the air in a stiff, mechanical chop. "Who's he going to damage with that lobbying?" Lane asked. "He's going to hurt someone with these social issues, because the state is split over these issues."

Coleman thrusts aside such charges, saying he is not pressing for "social change" but for revisions in the criminal justice field that the legislature must address. "The people are tired of more studies," Coleman said lask week. "The real action in the next four years is going to have to come from the General Assembly," he said.

The television debate, broadcast by educational TV stations, has not left Lane without an offensive, however. Seizing on an Oct. 17 Coleman speech, Lane has charged that Coleman is attempting to inject "vengeance" into the state's criminal courts. Both men have espoused a hard line on crime and Coleman, according to a campaign press release, said: "Today, the emphasis must be on protecting society from the predators in its midst even if it means we have to yield occasionally to the temptation for vengeance."

"Vengeance has no place in the criminal law today," Lane told another debate audience last week. "The Bible of the Lord says, 'Vengeance is mine.' It is not proper in our criminal justice system, I don't care how you look at it . . . I don't even think it is right to talk about it."

Coleman, whose caustic attacks on Democrats won him few friends in the Assemby, seems unperturbed by the intensity of Lane's attack and has refused to apologize for his words. It is all a matter of how you define "vengeance," Coleman insisted.

"My definition is 'punishment inflicted for wrongs committed,'" he said, as his campaign car rolled through a rainstorm toward Richmond. But a few moments later, he conceded, "There is a connotation of (punishment) unreasonably imposed."