The truth about this is not simple. Let's take a look at it.
If you make "too much" money, you might not be able to do a Chapter 7 bankruptcy, the one that gets rid of your debts quickly. The usual alternative is a Chapter 13 bankruptcy, a payment-plan type of bankruptcy.
What is "too much" money? There are two versions of this, (1) "failing" the Means Test, a very artificial test based on your last six month income, and (2) having monthly net income that's more than your monthly expenses.
BUT, even if you do have to do a Chapter 13 bankruptcy, you may have to pay your creditors only pennies on the dollar, so a Chapter 13 isn't the end of the world.
A Chapter 13 also has a few benefits that a Chapter 7 doesn't, like being able to pay off back mortgage payments over time, or even to eliminate a second or third mortgage on our house.
As you can probably tell, this is the short-short version of this subject. But really, it's probably all you want to read about it because the longer version gets complicated. Your best bet is to consult with a bankruptcy attorney experienced in Chapter 13 (not all of them are) and hear what's so for you in your particular situation.