Student loan are normally not discharged in bankruptcy.
There is a "hardship" exception which requires that the debtor (the person who has filed for bankruptcy) file an adversary proceeding (lawsuit) against the student lender to determine if the hardship applies, which is very difficult and in the majority of these type of "hardship" challenges do not succeed. However, one commentator has estimated that 40% do succeed, so it may be worth consideration.
However, if you do not qualify for the "hardship" exception, and you are struggling with the massive student-loan debt and monthly payments larger than your disposable income, you may wish to consider a chapter 13 bankruptcy plan. It won't discharge your student debt, but it will give you up to five years breathing space with a fixed monthly payment through the Chapter 13 plan based on what you may be able to afford to pay.