If your debt is revolving credit (credit cards) you should pay it off . Don’t carry balances, as has been said, interest rates are th key determinant and most CC have high rates. As for paying off mortgages, money is “cheap” (low rates) right now so it tempting to use that money to invest as long as you can beat the return. The caveat is mortgages are expensive over their life and you can pay more in interest than in principle so paying off the mortgage makes sense, that’s what it did for my mother, if your a risk averse investor that COA makes sense. Then use the money you save from each months mortgage payment and invest it overtime , dollar cost average into investments rather than do it all at once, dampens out the (wild) swings in the market. Any good financial advisor should ask you about your tolerance for risk and go from there.
Anyways my thoughts.