Possibly. I would strongly encourage you to seek the help of a bankruptcy attorney in your state and direct this question to him or her as they should know the civil procedure for your state and gather more clarifying information to address your question.
First, I am going to assume you are referring to a civil court (and not a criminal matter). But in general, if a judge ordered you to do something, that is a court order. If you violate a court order (by not doing what was ordered), the judge can hold you in civil contempt (contempt of court) and one of the possible sanctions for civil contempt is jail.
Your state's law and civil procedure rules will ultimately determine the answer to your question, so you should seek a consultation with an attorney licensed in your state.
It depends on what the debt is. If the debt is dischargeable, you have a much better chance of being able to avoid paying it. You should definitely talk to a bankruptcy lawyer. However, if the debt is part of a family law case, you should make sure that the bankruptcy lawyer is experienced in family law as well.
If you file for bankruptcy and the debt to which you are referring is dischargeable, the Federal Bankruptcy Court will put a "stay" on the state court's order. Therefore, failure to pay will not constitute contempt. However, until such time as the bankruptcy court enacts this "stay" you must comply with the State Court's order or you could be held in contempt.
This answer, however, assumes a dischargeable debt. Be sure you discuss this issue with your bankruptcy attorney.
The above commentary should be used for informational purposes only and does not consitute legal advice. No attorney-client relationship is formed by rendering this advice.