How does the court determine whether the debt is support or just a property settlement that can be discharged?

First, the court will look at the spouses’ intent as to how the payment should be treated, but this is not dispositive (which means settling the issue).

Next, the court will look at a number of factors to determine whether the payment is "in the nature of support": whether the support was awarded by the state court; whether there was a need for support at the time of the decree; what was the intent of the court in issuing the decree; whether the debtor ex-spouse’s obligation terminates upon the occurrence of some fact or issue; what is the age, health, skills, and education of the ex-spouses; whether the payments are made periodically over an extended period of time, or are in a "lump sum" (payable all at once); whether there is the existence of a legal or moral obligation to pay support; whether the obligation is enforceable by contempt; what was the duration of the marriage; what are the financial resources of the ex-spouses; whether the payment was set up to balance the disparate incomes of the ex-spouses; whether the creditor ex-spouse relinquished some rights of support in payment of the obligation;
whether there are minor children in the care of the creditor ex-spouse; what was the standard of living of the couple during the marriage; what were the circumstances that led to the divorce; whether the debt is for a past or future obligation, a property division, or an allocation of debt; and what is the tax treatment of the payment by the debtor ex-spouse.

As is evident, the courts have a measure of judicial discretion in making this determination, and as is also the case the judge does not make his or her determination lightly.

Courts realize that divorce works hard on a middle-aged woman whose contributions to the marriage have been child rearing and homemaking.
Age is a factor in the consideration of whether to grant maintenance (support). If an ex-wife’s age is such that the possibility of attaining a job or professional position is slim to none, or if her age is such that she could only find a minimum wage, part-time job, then the property settlement is much more in the nature of support than a debt.

Courts consider the age and health of a spouse, particularly a homemaker wife, because such a woman is often at a severe disadvantage in re-entering the job market and therefore in need of support.

Like age and health, the duration of marriage can affect other factors, such as the earning capacity of the recipient and the age of the ex-spouses. In addition, if the term of the marriage was very short, a judge is unlikely to award spousal support, unless there are young children of the marriage.

Any property settlement under these conditions would be investigated as to whether it is in the nature of support.