A quick answer is "no". You cannot file for bankruptcy to get out of paying your obligation for child support or alimony. If you are owed child support or alimony, bankruptcy is not a threat to your rights to receive those payments.
Chapter 7 Bankruptcy will benefits both sides by eliminating creditors competing for the same dollar.
Chapter 13 Bankruptcy allows debtor to get current on child support or alimony arrears. This is helpful when debtor has his driver's license suspended due to nonpayment and needs his driver's license back. Because child support and alimony are priority debts, they must be paid in full over the life of the Chapter 13 Bankruptcy Plan, which is no longer than 60 months. However, you can ask child support services in your county to release the suspension much sooner upon Chapter 13 Bankruptcy filing or Plan confirmation.
However, if circumstances changed where you can no longer afford your child or spousal support payments, you should go back to court and change your payment.