Where is this magical money coming from that you can pay off debt AND invest? If you're using money to pay off debt, that's money you can't invest. Do you even understand what you're saying, or are you just regurgitating what you think you remember hearing from Dave Ramsey?
Contrary to what Dave Ramsey says, there is such a thing as good debt. If your mortgage has an interest rate at ~3% if you refi recently, the average long term return (10+ year minimum timeframe) of the S&P500 is ~9% annualized. Since a mortgage is a long term loan, we're going to use long term amounts. Because the 3% is amortized and the 9% is compounding, you'll get SIGNIFICANTLY more return by NOT paying off the debt other than what the minimum is. However, if you can't understand the benefit of compounding over amortization (as you showed by avoiding my question), then this is going to be way over your head.
Oh yeah, and you get to write off that mortgage interest, making it even BETTER to not pay extra to your mortgage. But follow Dave Ramsey, it's not my money that's being lost.