Many people fear debt, because they worry about the consequences of not being able to pay the interest on it, or pay it back. However it is a huge mistake to let that fear override another truth, which is that debt is a brilliant device. It allowed me and millions of others to buy a house, and for many years continue to buy houses. More generally, it allows individuals to spend more money early in life, and pay for it during middle age when they are normally earning much more.
The extent to which we can transfer our own income intertemporally to smooth consumption over time has been growing over my lifetime. The opportunity to borrow when young is undoubtedly a good thing, yet despite this many on both left and right complain about the corresponding increase in debt that automatically comes from that.
Exactly the same is true for government debt. It allows governments to keep their spending on health, education and everything else stable when revenue streams fluctuate because of booms and recessions. In addition, it allows governments to cushion the impact of recessions on individuals who lose their jobs (unemployment benefit), and this ‘automatic stabiliser’ helps moderate the impact of the recession for everyone else. It allows the government to spread the cost of investment in roads and hospitals, so that those who benefit (current and future generations) help pay for it. It allows the government to respond effectively to a crisis, like the Covid pandemic.
This is all possible because it is fairly costless to allow debt to fluctuate when revenue fluctuates or spending needs to temporarily rise. Imagine the harm that would follow if public service provision had to go up and down during the business cycle, with the NHS carrying out less operations in recessions, or children getting taught less.
A key corollary of the idea that debt allows smooth taxes and spending is that if debt increases substantially in a crisis it should be reduced back (if at all) very slowly. Debt to GDP can be reduced gradually over many decades (as UK debt from WWII was), or not reduced at all if there is no reason to think the level of government debt is excessive.  I have suggested that action to control climate change should also be regarded as a similar crisis.
Once this has become clear (as it will be to any economist), the idea of a debt target immediately becomes problematic. The whole point of debt is that it can go up and down depending on economic circumstance, so trying to fix it (or the change in it, the deficit) at some number is in danger of undoing all the good things debt can do outlined above. A target for debt is a bit like setting a target for how much fuel your central heating boiler can use, and as a result you freeze on cold days but get over hot on warm days.
So why do governments have targets for debt or deficits? The answer is that government debt can be abused by politicians for political advantage. In the early years of the Trump presidency he and the Republican Congress cut taxes for the better off, and paid for it by increasing the government’s deficit rather than raising taxes on everyone else. The political reasons why this was done are obvious, but this is an abuse of government debt, because there is no intertemporal smoothing involved.
Last week we saw our own government do much the same thing. The Chancellor cut taxes by pencilling in future public spending numbers that were pure fantasy. As these public spending numbers could never be implemented, taxes are bound to have to rise again after the election whoever wins it, to pay for more realistic public spending plans.
Why did the Chancellor do this? It’s a political win-win for him. He can claim that the Conservatives are the tax cutting party, and hope to get a bounce in the polls from voters who didn’t read the IFS, Resolution Foundation or another good analysis of what was going on.  He wins if that means the Conservatives stay in power. He also wins if they lose the election, because then it will be a Labour government that raises taxes and he can say I told you so.
This type of abuse of government debt by politicians is why we have debt or deficit targets. To put it starkly, if we always had governments that just acted in society’s interest, debt or deficit targets would not be necessary. It is also why saying we have to have these targets ‘because of the markets’ is quite wrong. For economies like the UK, the markets are not a kind of policeman taking action if governments abuse government debt.
Although this explains why targets for debt or deficits exist, the problem remains that trying to hit a target for debt or the deficit makes no sense in the short term, because debt is what allows the government to smooth its spending and taxes. There is a real conflict between allowing good governments to use debt wisely, and stopping governments abusing debt for political ends. 
There are three approaches to this conflict. The first is to ignore political abuse of government debt, and have no targets for the deficit or debt. This is kind of  what happens in the US, and leads to a bizarre situation where Republicans are seen as tough on the deficit but in reality are not and the Democrats have in the past reduced the deficit and suffered the associated political costs.
The second approach is to largely ignore the economic advantages of government debt and focus everything on controlling it. The clearest example of this approach is Germany, and its debt brake. (The historical background to its imposition is described by Adam Toose here. The brake is popular among the public, but not with economists.) Essentially this involves imposing a fixed path (strictly an upper bound) for nominal debt, with deviations only allowed in two circumstances..The first is a cyclical downturn, but any deviation (excess deficits) have to be corrected in the subsequent upturn (with deficits less than the target) . The second is a designated (by parliament) crisis, where any excess deficit has to be steadily paid back over a set time period (e.g. 20 years).
This debt brake has been made part of the German constitution, so the courts can overrule the government if it thinks the rules are not being obeyed. This happened very recently, where the court ruled that the government couldn’t use some of the unspent crisis money from the pandemic to spend on greening the economy. You can think of a constitutional debt brake as a natural expression of German ordoliberalism, or as just a huge mistake.
In an earlier post I described Germany’s debt brake as perhaps the worst fiscal rule ever applied by a modern government to itself. It turns government debt from a flexible instrument that allows various forms of beneficial smoothing into a rigid straightjacket that stops the government doing important things, like investing in greening the economy. Rigid targets for the total deficit or debt invariably lead to underinvestment in the public sector, and that is exactly what has happened in Germany. Lack of public investment in time leads to less private investment, and a weak economy. Germany is a textbook example of the problem I recently described here, where deficit obsession leads to economic stagnation.
The third option is to have some form of deficit target, but to make it as flexible as possible to allow the government to use its debt in a beneficial way. I have consistently argued that this is best done with a five year ahead rolling target for the government’s current deficit (excluding public investment), with no additional targets and to apply only outside recessionary periods. But I have also argued that any fiscal rule alone will always be inadequate, either because governments will always find ways to cheat or because occasionally even the best fiscal rule should be ignored. You also need a fiscal watchdog: an independent organisation that can act as a referee for aggregate fiscal policy. Osborne, when he set the remit for the OBR, ensured it would not be such a watchdog, but it would be quite easy to change its remit so it could become one.
This third, middle way can provide the benefits that government debt makes possible, but also ensure that debt is not abused by politicians for their own ends. The problem we have had in most countries that have imposed fiscal rules is that both politicians and the media have focused on the latter at the expense of the former, perhaps because they think about politics more than economics. As a result, these rules have done and are doing considerable economic harm, while any benefits remain difficult to see.  However, forsaking any fiscal rules would mean that the kind of fiscal deceit we saw in last weeks Autumn Statement becomes routine, rewarding irresponsible governments and penalising the more responsible.
 One or two economies have governments whose financial assets are greater than their debt, so they are able to finance investment and intertemporally smooth by changing their asset levels rather than their amount of debt. The political reasons why these countries are unusual will become clear.
 We have very little idea of what the optimal level of government debt is.
 As should now be clear, governments abusing debt works in political terms because voters do not regard increases in debt as future taxes. This in general is not completely irrational, because voters can always hope that someone else pays the future taxes. In the case of the Autumn Statement, however, because taxes will rise immediately after the election, then believing the Chancellor’s rhetoric or the right wing press is either being irrational or more probably reflects being ill-informed.
 This conflict is the basis of my paper with Jonathan Portes.
 Except when a Republican Congress tries to impose a debt ceiling.
 Advocates for rigid fiscal rules, like the German debt brake, normally count falling government debt to GDP as a benefit. This confuses means with ends. There is no solid evidence, or indeed relevant economic theory, that suggests countries with low debt to GDP derive any benefit compared to countries with higher debt to GDP.