The debate may generate a fair amount of noise that provides one side or the other with a temporary political advantage but is unlikely in the end to have an appreciable impact on gasoline prices.

“Every time Americans have to shell out $60 or $80 to fill their tanks, they mutter under their breaths about government and it puts pressure on Congress and the White House to do something,” said Byron L. Dorgan, the former Democratic senator from North Dakota who is now co-chairman of an energy project at the Bipartisan Policy Center in Washington. “But it’s just howling at the moon. The basic laws of supply and demand haven’t changed.”

House Speaker John Boehner unwittingly gave the Democrats a political opening to pile on the oil companies by saying in an interview with ABC News last week that oil companies should “pay their fair share in taxes” and that Congress ought to reconsider some of the tax incentives they enjoy. He has since walked away from those remarks and said that raising any taxes would choke off the economic recovery and lead to higher prices of gasoline and other goods.

His comments came as lawmakers from both parties were home on recess, hearing a torrent of constituent complaints about the high cost of gasoline at the same time major oil companies were reporting near-record quarterly profits. Exxon Mobil, the world’s largest oil company, said it earned $10.7 billion in the first three months of the year, and other companies reported similarly robust earnings.

Mr. Obama seized on the opportunity to try to deflect some of the heat he has been feeling as gas prices have steadily climbed. He noted wryly at a political fund-raiser last weekend that his poll numbers tend to go up and down with pump prices, even as he admitted he had no “silver bullet” to bring those prices down in the short term. But he found ammunition in the tax breaks the oil industry has enjoyed for decades, portraying the industry as undeserving of them at a time when government needs all the revenue it can get.