I'm in the camp about investing > paying off debt. Here are some reasons:
1) If you die tomorrow, paying off debt won't leave anything to your heirs, saving in a retirement account will (exempt from probate/creditors when a beneficiary is designated). Pretty much all loans and credit cards extinguish upon death unless someone has cosigned for them.
2) Vanguard had a report about #'s regarding two similar debtors where one person saved right out of school at age 22 vs. the same person devoting every resource available to paying off student loans. With a reasonable set of assumptions, the person who saved early reaped the benefits of compounding interest and, even when factoring interest paid, had more than the aggressive debt payor.
See article:
http://www.nytimes.com/2014/06/14/y...nt-loans-can-cost-you-in-retirement.html?_r=0
3) In a "**** hits the fan" situation -- a lower student loan balance just isn't as useful as cash in the bank (6 mo. cash reserve/emergency fund), or a relatively liquid retirement account that you can tap. If you suddenly become unemployed, if you singularly pay off debt but fail to save cash, you can't pay the rent/for food/etc...
4) This applies to me mostly, but paying off student loans is a dumb move because I'm intending to relinquish most of my balance via PSLF at year 10 (I'm about 20% of the way there). Putting away the statutory maximum $17,5000/yr lowers my AGI, which in turn lowers my monthly payments when they recalculate every year. So each dollar I put away (a) earns market returns and compounds, (b) lowers my student loan payment, which (c) subsequently increases the amount that will be forgiven.
I've been saving since 2005 -- had I not done that and just attacked my student loans (undergrad + grad) and saved zero in retirement, I would have missed out on 35%+ market gains over that period of time. Extra dumb if you're chasing my 3-7% student loans. From 2005-2012 this was done exclusively through a Roth vehicle while my taxes were low and an AGI-lowering benefit of a traditional IRA was not advantageous.
So, as with all things money, dogma is stupid, and there are lots of nuances to what's best for anyone. Advice that works for you won't necessarily work for the next person.