Most people carry some form of debt. It could be $800 in credit cards, $120,000 in mortgage, and/or $15,000 in student loans. Everyone's debt load is different, as are the kinds of investments that you will be able to make while in debt.
When considering how much to invest while paying off your debt, it is more important to look at the rate of interest that you are paying than the total you are paying. If you are paying off your mortgage at 3.5%, that debt is growing at a very slow rate. Sure, you would save thousands of dollars in total payment if you were able to pay it off all at once, but you experience that loss very slowly and gradually, often over either 15 or 30 years. Student loan debt is similar in that it is also paid off with a low rate of interest. By paying off just the minimum amount and putting the rest of your spare money into savings and investments, you have likely made a wise decision.
The thing you have to keep an eye on is the rates. If you have mutual funds that are yielding 8.9% every year, and a student loan at 4.6%, you are making money faster than you are losing it. However, if you are paying off a credit card at 23.9%, you are losing money much faster than you are gaining it with those same mutual funds. In this situation, it is much better to kill off the big interest debt before allocating much to your other investments.
There are two exceptions I would recommend for certain individuals:
1) Limited Funds in High Risk, High Reward Investments. Of course this won't work for everyone. But some people become very skilled at an investment form called spread betting. It's a form of day trading where the user wagers on the behavior of markets and stocks, whether they will grow or shrink within a certain time frame. Get it right, and you win; get it wrong, you lose. You can make thousands of trades a day if you want to (though I don't recommend it). If you limit your investment to between 5-10% of your investment dollars, you may see a huge return, if you're careful. Use the free tutorials to see how you do before you sink much money in risky investments, despite their excellent payoffs.
2) Everything you can spare in tax-deferred accounts. IRAs (Individual Retirement Accounts) are a way to save money in the stock market, but avoid paying taxes on it. You can choose to pay taxes now (and not when you withdraw at retirement). You can also choose not to pay taxes now (waiting to pay when you retire). Because these monies, invested in index mutual funds, mirror the overall growth patterns of the market, you're all but guaranteed to make money over time. You'll also have compound interest working for you, you yields going back into the pot to swell with the rest of your money.
Investment is tricky for people in debt. Getting out of debt should be your first priority, unless the debt you have is very low-interest. If you've gotten rid of your bad debt, invest away.