We were within days of the debt ceiling, not of default. Plenty of things could have been shuffled around to meet all debt payments (including some politically useful ones like stop sending SS checks, don't pay the troops, etc).
It depends on what you mean by "debts"; you're only in default from the finance industry's perspective if you fail to service bonds/loans/etc., not if you fail to make other payments you've promised. For example, if IBM stopped paying its employees' salaries, or stiffed its suppliers, but continued servicing its bonds, it wouldn't be in default. S&P is specifically rating the chance of a default on bonds.