It seems, you are planning to do the right thing anyway. But I'll say it nonetheless: Don't try to time the market.
What were your original reasons for first paying of debt before investing? Are they still valid? If yes, stay the course!
Depending on how high your interest rates are (and what kind of debt it is), it might theretically be a good idea to do both: Use x% of your monthly savings to pay off debt and (100-x)% to invest. But you must have a plan that you will adhere to (Hence, x must be a fixed number, until your debt is paid off). Don't try to time the market.