On cue, Mr. Ryan said President Trump’s budget was “right on target” even as he released a statement about it that criticized Mr. Obama’s “bloated budgets that never balance.”

This about-face is not new for the party of financial responsibility. President Ronald Reagan promised to balance the federal budget and then, while in office, pushed through tax cuts and military spending that more than doubled the national debt. President George W. Bush promised to pay down the debt only to sign tax cuts and defense increases that doubled it. Republicans have a pattern of caring deeply about government finances while out of power and then forgetting those concerns when they’re in control.

But this particular change of heart on federal debt follows years of using the fear of rising government costs to severely hamper Mr. Obama’s agenda. Republicans’ opposition to spending increases was part of how the 2009 stimulus package, passed to rescue a sinking economy, got whittled down from what would probably have been a more effective figure.

Mr. Ryan called it a “wasteful spending spree” at the time, despite the fact that most analysis found that any debt added would eventually be fully offset by economic growth. Talk of a second round of stimulus was dead on arrival with Republicans. So a sluggish recovery was laid at Mr. Obama’s feet.

The debt fear-mongering had other negative consequences. In 2013, government spending was put on a destructively tight leash by sequestration, automatic spending caps that were meant to spark a grand bargain on the budget. Instead, they reinforced Republican thinking that federal spending had to be reined in. Republicans argued against speedy emergency funding when floods or hurricanes hit various parts of the country, delaying much-needed help, and tried to push Mr. Obama into bargains on spending cuts.

Democrats have turned the Republicans’ tactics against them, stating that Mr. Trump’s policies are bad because of what they will do to government finances. Nancy Pelosi, the House minority leader, called his tax plan “deficit-exploding.”

It must be satisfying to turn Republicans’ own debt arguments back on them. But the honest objection Democrats should raise is not how things will be paid for, but whether they’re worth the cost.