For two weeks, the Kennedy campaign had been waiting -- not too patiently -- for the volcano to erupt.

Ever since President Carter declared on April 30 that the Iranian hostage crisis and the U.S. economy had become "manageable," permitting him to leave the White House, the Kennedy camp had been waiting for politicians and editorial writers to start blasting away at the president's turnabout.

To Kennedy partisans, Carter's change of strategy gave the lie to the president's pronouncements all spring that he was to busy to bother with politics. And to Kennedy partisans, Carter's blanket refusal to debate his Democratic challenger seemed to prove that politics was at the core of everything the president was doing.

But the eruption never came, and last weekend Kennedy and his advisers decided to force the issue. Beginning Sunday, with his appearance on ABC's "Issues and Answers," Kennedy stepped up his attacks on the president's no-debate position. And he decided to make yesterday's attention-getting offer: if Carter would debate, and could still beat Kennedy in the June 3 primaries, Kennedy would withdraw before the Democratic National Convention to be held in August.

Kenndy gave the proposal an all-or-nothing quality, but in fact it is about as close as a politician can come to a no-lose deal.

Debate or no debate, Kennedy's challenge to the president will be effectively over if he does not win, at least in the major primary states, on June 3. Even if he wins two or three of the June 3 primaries, he will end the day behind Carter in the delegate count.

If Carter were to accept Kennedy's challenge, it would pump new excitement into an election campaign that has, to a large extent, lost the nation's attention. One of the few ways left for Kennedy to get people to listen to his attacks on Carter is to convince the president to share the podium while Kennedy is attacking.

But the president's immediate refusal of Kennedy's challenge serves a Kennedy purpose, too. Campaign aides say the challenge and its rejection will stir up some editorial writers, who they believe have a professional interest in major debates on national issues, to criticize the president for failing to "participate in the process."

Kennedy's challenge was carefully worded so that the challenger would not have had to alter his campaign plans greatly if it were accepted. Kennedy said only that he would withdraw if, after a debate, Carter won more popular votes -- not delegates -- on June 3.

Kennedy has focused his campaigning on the three biggest states that will vote on June 3 -- California, Ohio and New Jersey. The population of those three is larger than the total population of the other five states holding June 3 primaries, so Kennedy could presumably draw a majority of the day's popular votes by winning in those three states.

Carter's rejection of the latest debate proposal leaves the Democratic race where it was: Carter is far ahead, and Kennedy's only hope is to embarrass the president so badly in the June 3 primaries that national convention delegates in Carter's camp are moved to reverse themselves and embrace the challenger.

In his effort to achieve that considerable feat, Kennedy will presumably hit harder than ever at Carter's refusal to face him.

"If the president is afraid to defend his record now," Kennedy said yesterday, "how can he hope to defend it if he is the nominee . . . ? His fear of debate speaks louder than any words."