Yeah definitely get rid of all high interest debt first. Like I said the average for the stock market is roughly 8% a year, so any debt above that needs to go with 100% certainty before you even consider investing. Take into account the risk factor and I'd say it's going to fall to somewhere around 5% interest rate where you can start thinking of investing rather than paying off debt.
There are no guarantees with the market, but there are always guarantees that people will be chasing for their money and will penalize you if you don't pay up. That's something worth considering in all forms of personal finance.
Yes it is true that it is always good to pay off rather than invest. A lot of people would face difficulty in future when you have debts to clear and the financial strain is high.
The last thing you want is to lose out on being debt free. Debt is hard enough so when you get that cash to pay it off then do it. At least then if you want to invest then the money would be able to be used for investments.
One of the things that happened prior to the dot com bust back in the 90's was that there were people that were indeed making crazy money in the market. Some took it upon themselves to suddenly become day traders. It was not unusual to read that some self proclaimed day trader was now a millionaire because he took a chance on this or that upcoming tech stock. Well the thought that this was the fast track to being wealthy caught on like wildfire and many people figured it was so easy. After all it was sort of like playing a video game, watching the market and all. So these self styled gurus would open a ETrade account or get to someone that claimed they could make them rich and they would scrap up money from credit cards or savings or where ever they could because so many people were getting rich. Then BOOM! Pay your bills, invest for the long term in a conservative fashion for the most part, take on speculative risk for only a very slight portion of what you invest. Diversify your portfolio. And know you could lose it all, there are no guarantees.
In the past I have paid off what I could while working hard to earn more income. I didn't really have a lot but I did have only one student loan. It's really important to pay off the debt first before doing anything else.
I wish I was one of those rich people making that crazy money. I guess it does not work for all of us. Some people could make crazy money and some cannot.