WASHINGTON — The Senate on Wednesday started debating its first comprehensive energy legislation since the George W. Bush administration, a bipartisan measure meant to update the nation’s power grid and oil and gas transportation systems to address major changes in the ways that power is now produced in the United States.

Since passage of the last major energy law, in 2007, the United States has gone from fears of oil and gas shortages to becoming the world’s leading producer of both fuels. The use of wind and solar power is rapidly accelerating as those sources become cheaper than fossil fuels in some parts of the country. And President Obama’s clean air regulations are reshaping the nation’s power systems, as electric utilities shutter coal-fired power plants and replace them with alternative sources.

But the nation’s energy infrastructure has not kept pace with those changes.

Throughout the Obama administration, partisan differences over energy policy and climate change meant that meaningful energy legislation had essentially no chance of passage. When bills were offered, they were partisan measures meant to score political points rather than to enact substantive policy.

People tracking the process on both sides of the political divide express some optimism that this time may be different and that the new legislation could make it to the president’s desk. That will depend on whether debate over the bill spills into the presidential campaign, where it could be used as a proxy for issues like climate change, oil and gas drilling and Mr. Obama’s regulatory agenda.