Short answer: Pay high-interest debt first (credit cards). Keep low-interest debt (student loans). Less debt = bigger mortgage.
Pay off high-interest debt first. Credit card debt at 20% costs more than mortgage interest at 7%. But keep making minimum payments on low-interest student loans. The bank also cares about your debt-to-income ratio. Less debt means you can borrow more. Do the math on interest rates.
Credit Card Debt: $5,000 at 20%
Student Loan: $20,000 at 3%
Recommendation: Pay off credit card first
Reason: Saves $1,000/year vs $600/year on student loan