Time-Barred Debts and STATE STATUTES OF LIMITATION ON COLLECTING DEBTS are good places to start on the issues of what can be collected and for how long. What seems to be at issue is bankruptcy vs. time-barred debts vs. what creditors (original debt owners, not collection agencies or those who buy debt) can do. You should also check out The Fair Credit Reporting Act which governs some of the question.
The Fair Credit Reporting Act and the section on time-barred debts applies to collection agencies, etc. (so-called debt owners as pointed out by @littleadv, since they buy debt from the creditors) not actual creditors (those the debt is/was originally owed to). Creditors (those to whom the debt was originally owed) have different rules than debt collectors and can do things debt collectors can't. State law generally governs what creditors, as original owners of the debt, can do legally and for how long.
Bankruptcy
Bankruptcy is a legal action that frees someone from paying all or part of debt owed (they are crying "Uncle!" and stating they don't have enough money to pay their creditors). On a credit report, accounts will generally be updated to show “included in bankruptcy" or similar. Debt that is determined to still be owed often will be reduced in amount/payments.
Time-barred Debts
Time-barred debts are debts that are still owed, but cannot be collected through direct legal action (suing). Each state has its own statute of limitations on how long different types of debt can be collected by suing after initial default before being considered time-barred. This period is typically 3-6 years but a few states such as Kentucky allow much longer time periods (up to 15 years).
Being a time-barred debt does NOT prevent a collector from contacting someone about a debt. Collectors can still try to collect a debt forever -- and probably will -- but they can't normally sue and collect payment once the statute of limitations period has passed.
There are gotchas with time-barred debts regarding collection, however, which can make them still legally actionable. Making any payment, no matter how small, making a verbal commitment to pay or even acknowledging the time-barred debt is often enough to make the debt legally collectable, even if it would normally be past the statute of limitations for collection. This is again state-dependent, but it is a pitfall for many people. The process of making a debt collectable again is often called "re-aging". Re-aging essentially means the clock starts anew on the statute of limitations, extending the time that a creditor may use the courts to collect that debt.
If someone is taken to court over a time-barred debt that is legally noncollectable (has not been legally re-aged), nothing happens to them. However, being time-barred does not prevent legal action in the sense that you still have to prove the debt is time-barred and noncollectable in court if your sued over it.
Being time-barred does not mean the debt "dissolves". A debt is always owed unless the debt has been forgiven or discharged in bankruptcy court. This means that, combined with the ability of debt collectors to contact someone about out of statute debt and the pitfalls of re-aging, it is entirely possible for a debt collector to get a 20 year old debt actionable again.
Also note that while someone is trying to dodge a debt to make it time-barred (e.g. by not paying anything), creditors and debt collectors can still take legal action to sue over the debt, and if they get a judgment against someone, this can extend the debt indefinitely. Judgements will eventually lapse, but often only after 10 years or more, and many states allow dormant judgements to be "revived" within that time period.
Credit Reports
Regarding credit reports, whether someone owes a debt and whether it appears on a credit report are two separate things. As previously stated, no debt "dissolves" or goes away unless some sort of legal action makes it so.
As far as reporting is concerned, however, most "bad" credit stops being reported after seven years (by federal law). That is, accounts on a credit report will be deleted seven years from the original delinquency dates of the accounts regardless of being included in bankruptcy or as time-barred debt. This assumes no legal process allows the account to continue being reported (as is often the case with re-aging). As an FYI, a bankruptcy discharge date has nothing to do with when account information will be removed from your credit report.
Note that some debts, such as tax liens, can be reported indefinitely.
Should bankruptcy be considered?
The decision to do bankruptcy is mostly a matter of how severe the debt is. If it is an extremely large amount and assets are very small, bankruptcy is a good route in so far as it will legally take care of a lot of loose ends and likely relieve most or all of the burden of actually owing the money. Credit-wise, 10 years is the maximum a bankruptcy (specifically) will appear on a credit report. Accounts may drop off a credit report before bankruptcy because they are past the seven years they can be legally reported. Debts owed to the state such as child support, student loans, income tax, etc. generally cannot be written off and aren't subject normal debt statute of limitations on collection.
Finally, bad credit is bad credit -- there is likely to be little difference in terms of ability to get loans between bankruptcy and attempting to dodge legal action to make debts time-barred. If the debt is significant, bankruptcy may be the only sensible option.