You framed your follow up question as though the divorce judge can ignore the Bankruptcy Code, but that’s not what would happen. The Bankruptcy Code does not discharge you from domestic support obligations (or other debts owed to a spouse in connection with a divorce). Here’s the law:
§ 523. Exceptions to discharge
(a) A discharge under section 727, 1141, 1228 (a), 1228 (b), or 1328 (b) of this title does not discharge an individual debtor from any debt—
(5) for a domestic support obligation;
(15) to a spouse, former spouse, or child of the debtor and not of the kind described in paragraph (5) that is incurred by the debtor in the course of a divorce or separation or in connection with a separation agreement, divorce decree or other order of a court of record, or a determination made in accordance with State or territorial law by a governmental unit;
If you were to file for divorce now before the judge orders you to pay the attorney fees, then the bankruptcy wouldn’t even come into play because it only discharges debts owed when the bankruptcy is filed … not debts incurred after the bankruptcy is filed. If you wait to file for bankruptcy after the judge orders you to pay the attorney fees, then the aforementioned bankruptcy law comes into play, which specifically states that domestic support obligations (and other debts owed to a spouse in connection with a divorce) are not dischargeable.
I regret that my answer is unfavorable, but please understand that it would be unfair to you (and unprofessional of me) to provide you with anything less than a truthful response. With that in mind, I hope that you found value in my answer. If so, then please remember to click the green accept button so that I will receive credit and compensation for my time. Positive feedback is always appreciated as well. Thank you and good luck!
DISCLAIMER: Please be aware that only an attorney licensed in your state is authorized to advise you in legal matters, and that the limitations of this setting may prevent your legal issues from being thoroughly addressed. Accordingly, please understand that (1) by answering your question(s) I am not acting as your attorney, (2) my answer(s) should be construed as general information only, and (3) our discussion is not an adequate substitute for an in-person consultation with an attorney.