The most common approach to measuring and quantifying GDP is the expenditure method: GDP = private consumption + gross investment + government spending + (exports - imports), or, GDP = C + I + G + (X - M)
The main problem here is that the formula includes government spending but doesn't compensate for changes in the government debt level, that is, in the short run the government can increase GDP by increasing spending financed by new debt, but paying off the debt in the future will reverse that effect causing a drag on GDP, and that drag is not reflected in reported GDP figures.
The philosophy of governments running large budget deficits as as a matter of course rather than to address rare specific needs (e.g. rebuilding Europe's economies after WWII) is based on an assumption that continued GDP growth will cause the debt on the books to diminish relative to the growing GDP. The essential ingredient in such an approach is that a proper cost/benefit analysis is performed to gauge that the debt fuelled expenditure is likely to have a positive real payback, and moreover that the chances of large scale investment failure are small (which is not quite the same as considering the mathematical expectation alone).
It may seem peculiar that a relatively poor nation such as China (as measured by per capita wealth) should act as creditors to much richer nations such as the USA and UK. The principle is that China has more wealth than it can comfortably re-invest in itself (as made evident by its very high GDP growth), and so that wealth seeks out investment opportunities elsewhere in nations with stable governments, rule of law etc. Developed nations in principle can absorb the extra investment into their newer 'knowledge' economies and use the generated wealth to pay back the Chinese with profit. This experiment has essentially failed, the investments made in developed nations were subject to the law of diminishing returns as those economies had likely reached a saturation point probably defined human genetics, e.g. not everyone has the capacity to become highly qualified and productive - you can get more such people through investment in education up to a point, but there comes a level where the law of diminishing returns kicks in.
Ultimately the failure becomes evident and debt markets turn sour as happened in 2008. However, government spending tends to have significant momentum - it's hard to stop and reverse once it's started - and as such in the absence of external creditors governments will tend to continue running a budget deficit by creating new money and spending that, using what is somewhat disingenuously being called Quantitative Easing. In principle that new QE money doesn't have to be bought back, i.e. the government gets to buy stuff for free. The reality is that the expanded money supply will cause inflation when an economy begins to recover, hence in reality the QE money must be taken out of the economy as it recovers to maintain a stable monetary system. This retraction requires that the QE money is taken out of the economy and destroyed and the money to do this is typically taken out of the tax revenue stream, hence causing a drag on spending and GDP. As such QE fuelled spending has the same problem as debt fuelled spending - it must be reversed and that reversal is a drag on the economy. So it all comes back to whether the spending today will create enough real wealth to cover the repayments in the future - the debt fuelled investment cost/benefit analysis.
We're taking prosperity from the future and injecting it into the present, but the GDP figure doesn't reflect this. So not only is growth approaching an imminent cessation, it may be the case that real growth began to slow some years ago and has been masked by the growth in debt. These may well be the final stages of denial whereby indebted governments try to drag out the perception of continued growth by pushing debt to its limits, whether they're cognisant of what they're doing or not.
(some time in 2010)