Paying off debt and building wealth are not mutually exclusive. These guides cover the interest rate math that tells you exactly when to do which.
The answer depends almost entirely on your interest rate. Here is the exact framework for deciding whether to pay down debt or put money in the market, with real numbers.