Determine your monthly surpluss or deficit
Typically it is fairly easy to know how much income you have each month, it's just the total of money you (and your spouse) bring home after taxes. Your monthly expenses can be more difficult because there are so many things we spend money on, but don't really notice or keep track of. Make an effort to itemize all things you spend money on and figure out if you are positive or negative each month. If you are negative, bankruptcy should be considered.
Add up all your debts
It's a good idea to know exactly how much debt you have to get a handle on the "problem." Credit card debt can add up fast with interest and penalties. Don't forget medical bills, collections, etc. You want as accurate an account as possible.
Determine how long it would take to pay off the debt
Based on your budget from step 1, and your amount of debt from step 2, figure out how long it would take to pay off all your debt at the current pace. If you're not making any sort of payment on the debt, factor that in as well.
If paying off the debt would take more than 2 years, consider bankruptcy
Obviously, the downside of bankruptcy is that it damages your credit. That doesn't mean your credit is bad forever though. You will be able to rebuild your credit over a period of time. Even though you may have the bankruptcy on your credit report for 7 to 10 years, that doesn't mean you'll have "bad" credit for that period of time. If you can file bankruptcy now, and rebuild your credit faster than it would take to pay off the debt, bankruptcy may be a very good option.
Don't get discouraged
If you are in debt, you are probably being bombarded with collection calls and nasty letters. Don't get discouraged. These collectors have one purpose: to scare and intimidate you. Don't take anything they say too seriously. Don't take legal advice from creditors. If you can't pay what creditors are demanding of you, you should seek the advice and counsel of a bankruptcy attorney. Most bankruptcy attorneys offer a free consultation. You must look at your personal finances like a business and make purely financial decisions, not emotional decisions. Bankruptcy is often the best solution.