To answer this question, you must decide how your money can work best for you. Compare the money you might earn on other investments with the money you would pay on your debt. If you would earn less on investments than you would pay on debts, you should pay off debt.
Let's assume that you have $1,000 in a savings account that earns an annual rate of return of 4 percent. Meanwhile, your credit card balance of $1,000 incurs annual interest at a rate of 19 percent. Your savings account thus earns $40, while your credit card costs $190. Your annual net loss is 15 percent, or $150, the difference between what you earned on the savings account and what you paid in interest on the credit card balance. It's even worse when you consider the tax effect. The interest on the savings account is taxable, and you have to use after-tax dollars to pay your credit card bill.
In the above example, it would be best to use your extra cash to pay down the high-interest debt balance. The same principle would apply if you were to invest your extra cash in a certificate of deposit (CD), mutual fund, or other investment.
Note: All investing involves risk, including the possible loss of principal, and there is no guarantee that any investment strategy will be successful.