MOUNTAIN VIEW, Calif.  Mayor Bloomberg is decrying the state of the 2008 presidential race, faulting the major party candidates for offering shallow, simplistic prescriptions, and scolding the press for failing to demand more from those seeking the White House.

During an appearance at Google's headquarters in Silicon Valley yesterday, Mr. Bloomberg said the televised debates among the presidential candidates have been, in essence, a waste of time.

"They have absolutely nothing to do with the job and the qualifications. And they don't tell you anything about whether or not any of those candidates would be good or bad presidents. What they really say is, did they memorize their notes of What to say if ' and whether their staff was able to anticipate," the mayor said. "If you look at both debates, they pandered, what I would argue, the same ways."

Mr. Bloomberg said the presidential candidates were exploiting the threat of terrorism, and failing to deliver solutions to problems such as illegal immigration, health care, and education.

"I think that none of them are addressing those issues," the mayor said during an exchange with reporters after the Google talk. "The press really is not doing its job of holding their feet to the fire. ... The tough questions are not what are you in favor of, but how are you going to get it through Congress?"

Mr. Bloomberg painted a picture of politicians in Washington dithering as America runs aground. "The country is in trouble," was his grim refrain.

The public critique of the presidential contest could be part of an effort on Mr. Bloomberg's part to lay the groundwork for an independent presidential bid. However, he insisted yesterday that he plans to serve as mayor through 2009 and then return to private life.

"I'm not a candidate for president," Mr. Bloomberg said. "My next career will be in philanthropy. I've done the government thing."

The mayor dismissed the debates as "just theater" and said he arrived at his assessment without having watched them on television.

Mr. Bloomberg's appearance on Google's campus came in the wake of visits from four declared presidential hopefuls, Senator Clinton, Governor Richardson of New Mexico, Senator McCain of Arizona, and a former senator from North Carolina, John Edwards. The mayor's chat was billed as part of a series dubbed "Authors @ Google." However, the autobiography that ostensibly prompted the invitation, "Bloomberg by Bloomberg," was released 10 years ago. "It is one of the seminal pieces of literature," he quipped.

Mr. Bloomberg warmed up the technology-oriented crowd of about 1,000 with tales of the "300-baud, acoustically coupled" modems used in the early days of the financial news and data service that went on to make him a billionaire.

"He's got some geek street cred," Google's top lobbyist in Washington, Alan Davidson, declared.

Mr. Bloomberg's freewheeling question-and-answer session was peppered with the kind of provocative, blunt talk that could appeal to some voters while alienating others. "It's probably because of our bad educational system, but the percentage of people who believe in creationalism is really scary for a country that's going to have to compete in a world where science and medicine require a better understanding," he said in one such foray.

Today, the mayor and Governor Schwarzenegger are to take part in a conference in Los Angeles warning that Washington is addicted to and paralyzed by partisanship. Messrs. Bloomberg and Schwarzenegger share the cover of Time magazine this week.

"Washington is sinking into a swamp of dysfunction .We're talking about a serious and harmful addiction here," Mr. Bloomberg was to tell attendees at an opening session last night, according to a prepared text released by his office. "Unfortunately, there's no Promises' clinic for partisanship."

Earlier yesterday, Mr. Bloomberg joined San Francisco's mayor, Gavin Newsom, at an event to build pressure on Congress to drop a legislative provision  known as the Tiahrt Amendment after the Republican congressman from Kansas who sponsored it  that bars the federal government from releasing data identifying the gun dealers that sell the most guns used in crimes.

"It's a disgrace," Mr. Bloomberg said. "It's a triumph of special interests and ideology." He said the restrictions have led to the deaths of police officers by preventing local officials from targeting the bad apples among gun sellers.

The mayor showed a flash of anger when asked by a New York Sun reporter about claims that releasing the gun trace data could prompt a flurry of lawsuits against weapons dealers and manufacturers.

"Let me just get this straight. You're worried about lawsuits and I'm worried about going to funerals? That's the story. Which would you rather have? There's no flurry of lawsuits. If people obeyed the law, there wouldn't be any reason to sue," Mr. Bloomberg said. "That's a ridiculous argument to make."