My brother had a situation like this with his first marriage when he found out his wife had racked up $1,000s in credit card debt without telling. I think she admitted that so she got stuck with the bill in divorce court and had to file bankruptcy.
Filing bankruptcy is not as simple as “debt goes away” unless you are destitute. Not only that, you can’t declare again for 7 years so if you run up any debt, you have to pay it off. You can’t tell people that if they made it disappear 2 years earlier. They won’t hear it.