Paul Krugman makes the point that government debt matters less than most people think because in some cases we simply owe money to ourselves. He is right and what he has in mind is the notion that government debt is (in many countries) mostly held domestically. Japan is an extreme case where more than 90% of the government debt is held by its nationals but even in the US the majority of government debt is held by US citizens or institutions. For some it is debt but for others it is an asset, they cancel out from a national point of view.
We can think of an extreme case where government bonds are held by all taxpayers in proportion to their income - in a way that mimics tax rates. In that case, government debt is not imposing a future burden on anyone, it simply cancels out with the assets that all investors/taxpayers have.
How do future generations enter into this analysis? What if we try to pass the bill to future generations? Let's start with the case of a closed economy/system. In a closed system (the world, no international trade or capital flows) the debt that the current generation has will end up in the hands of the future generation in one of two ways: either it gets simply passed to the next generation as a bequest or, alternatively, the current generation could try to sell their assets and spend all their wealth if they do not want to leave a bequest to their children. But the debt must be bought by someone. And given that this is a closed economy, it can only be bought by the future generations. In both cases the bond holders are also the taxpayers.
If we bring other countries into the picture then the analysis is different. The government debt that other countries hold is a claim on our current and future income and as such it is a financial burden that either the current generation or the future one will have to pay for. But Krugman's point, which is correct, is that many make the mistake of assuming that government debt is equivalent to external debt and they overestimate the burden that it imposes on a country.
Let's go back to the case of a closed economy: is it really true that debt does not matter? Not quite, because there are distributional issues of two types: first there is no perfect match between bond holders and taxpayers so it is not quite true that we owe money to ourselves. Some citizens owe money to others. The second distributional issue is about generations and here we need to go back to the example above to understand how difficult the analysis can get. The best way to understand the argument is to stop talking about debt and talk about spending and taxes, which is what really matters. A government spends some income today (builds a road, provides health services to the population). It decides not to tax anyone but instead it issues debt bought by the current generation. The government decides that it will only pay back the debt in the future when it raise taxes on the next generation, not the current one. Are we passing a burden to the next generation? It all depends on what the current generation does. If they decide to spend all their income and leave no bequests for their children then the answer is a clear yes. The current generation enjoyed services that they did not pay for themselves and did not compensate the next generation in any way for the future taxes they will have to pay. Just to be clear, the future generation will be holding the debt that the previous generation sold to them when they were spending their inheritance, but this is not a transfer of resources, the asset was sold at market price. So the fact that in the future bondholders are also the taxpayers does not mean that we are not passing a burden to the next generation.
There is a second scenario where there is no burden passed to the next generation. It can be that the current generation is responsible, understands that the government is asking future generations to pay for the goods and services that they enjoyed and they decide to leave a larger-than-planned bequest to their children so that they have resources to pay for all the taxes (you can think about the bequest being the government debt itself). In this case no burden is passed to the next generation.
This simple example (*) makes it clear that answering the question of what distributional impact government debt has across generations requires an understanding of the patterns of spending, taxes and saving of different generations. What matters is not debt but who enjoys the spending that the government does and who pays for it. Debt is just a vehicle that can be used to transfer resources across different individuals or generations. Debt is not a problem, the problem, from a generational point of view, is the potential mismatch between spending and taxes (even if future taxpayers are also the holders of government bonds when they are paid back).
(*) The example ignores many issues: the type of goods government buy, the possibility of default, the possibility of crowding out (government bonds displacing other forms of saving),...