The subject was the $9.2 billion two year budget proposed for the state of Virginia, but the most of the debate yesterday in the Senate was over less than half a million dollars.

One group of senators wanted to trim $450,000 from pay raises for state judges and state cabinet members and give it to fire and emergency medical services. Another group wanted to pay raised to stay intact.

The winners, in a close series of votes on floor amendments in this budget squabble were the judges and the cabinet officials. The debate once again showed the manner in which Virginia's multibillion dollar budget is approved every other year.

While hundreds of millions of dollars are at stake for education, transportation, social services and other governmental functions, the budget quibbles between the Senate and the House of Delegates almost always are over relitively minor items.

After debating the merits of higher pay for judges and other spending proposals, the Senate voted 37 to 2 in favor of the budget. Differences between the Senate and House versions will now be worked out in a conference committee.

Supporting more money for fire and emergency medical services, Sen. Madison E. Marye D-Shawsville) said: "These are the stretcher bearers who scrape you up off the pavement and put you in an ambulance."

Sen. Edward E. Willey (D-Richmond) argued that departmental secretaries deserve the full $5,600 raise - to $49,000 - proposed by the Finance Committee he chairs. "Virginia is a $9 billion corporation in the biennium," Willey said. "You just can't take a bunch of uneducated people of little ability and let them run the government. If you want a $25-a-week clerk to run the government, that's what you're going to get."

Sen. Dudley J. Emick Jr. (D-Fincastle) rejected arguments that state government executives should be paid salaries comparable to what they could earn in the business world. "There is a difference between government services and private enterprise ..."

Then Majority Leader Adelard L. of the plight of one judge he did not Brault (D-Fairfax) told his colleagues name.

"Do you know what he had to do last year?" Brault asked. "He had to put another mortgage on his home to pay for the clolleage education of his children because he has not had a raise since 1973."

Circuit Court judges, under the Senate version of the budget adopted yesterday, would get $2,500 raises in 1979 and 1980, increasing their salary from $42,000 to $47,000. District Court judges would make $42,300 by 1980.

What apparently was on many senators' minds was laid out in the open by Sen. William E. Fears (D-Accomac), an opponent of the full raises, who said, "The general public has a feeling we're taking care of our own." The General Assembly elects the judges, and many of them are either former legislators or law partners or associates of the legislators, more than half of whom are attorneys.

Another beneficiary of senatorial largest was Lt. Gov. Charles S. Robb, who got an additional $91,175 for increased staff support and related costs and also $16,800 for an office in Northern Virginia. (Robb lives in McLean)

The Senate version of the budget does not differ significantly from the House version.

The largest single item in the 1978 - 80 budget - about $3.6 billion - wouldgo for education at all levels. The next biggest item ($1.5 billion) is for transportation, chiefly roadbuilding. Human resources, primarily welfare, would cost about $700 million. Public safety would get about $780 million. About $860 million will be spent on health and mental health services. Administering the executive branch of the state government will cost $290 million.

The Senate version of the budget keeps intact all the $15.5 million in aid for Northern Virginia added by the House to outgoing Gov. Mills E. Godwin's spending plan. Some additional money for Northern Virginia Community College, $478,000 for George Mason University, $212,000 for Northern Virginia Mental Health Institute and $51,000 for the Northern Virginia Training Centre for the Mentally Retarded.

The senators decided to pay back all $35 million - instead of $15 million, as the House proposed - borrowed from the state highway fund two years ago and eliminated the entire $25 million contigency fund reserved for the governor.

Finance Committee Chairman Willey upheld Virginia's tradition of fiscal conservatism in explaining why the borrowed $35 million has to be paid back entirely in this biennium. He said: "If you sign a note and it had a due date, you pay it back."

When Sen. James T. Edmunds (D-Lunenburg) tried to get a floor amendment to increase funds in the alcohol-abuse program, an irritated Willey complained: "Here we are come on the last day we can consider the budget, and we're thinking of upsetting the whole applecart ..." The amendment was defeated.