Saving up an emergency fund is a well-trodden piece of personal finance advice. Having a cushion in place when things get tough can mean the difference between a catastrophe and a mere setback.

But debt repayment can also do wonders for your financial health. And it's hard to get serious about saving cash when you're constantly bleeding it in the form of interest payments.

So which of these two important budgeting objectives comes first: getting out of debt or saving up a few months' worth of living expenses?

Jar full of $100 bills

Image source: Getty Images.

Save it up or pay it off?

If you have absolutely no emergency savings -- like the majority of Americans -- most advisors would counsel you to build at least a small buffer before you go all out on debt repayment. Financial advisor Dave Ramsey famously tells people to save up a $1,000 "baby" emergency fund before paying off a single cent of debt, even if they're drowning in it. This is life, after all; something is bound to go wrong.

But other advisors suggest a bilateral approach in which you contribute as much as possible to both goals. That way, you can start chipping away at that towering debt while still working toward an emergency cushion.

It can be difficult to decide how to allocate your funds, particularly if they're limited. So if you're stuck in this conundrum yourself, we suggest you consider the following factors.

What kind of debt is it?

While it's never an ideal scenario to owe money, certain types of debt are more harmful than others.

For example, credit card debt is pretty much always terrible. Most consumer cards come with high interest rates, and carrying a revolving balance offers you no real benefit. Auto loans are another not-so-nice form of debt, thanks to vehicles' tendency to rapidly depreciate. (Yes, you may need a way to get around, but from a financial standpoint, a paid-off beater is the way to go.)

On the other hand, a home loan can help you build equity while keeping a roof over your head, and even a so-so mortgage usually carries less than 5% interest. There are also reasons to consider taking your student loan payoff strategy slowly. For one, most of us have five-digit educational debt totals -- and if you prioritize paying off every cent of it before you invest, you'll miss out on valuable years of compound interest.

So while repaying any debt is a commendable goal, it's worth taking a moment to assess what kind of debt you're carrying and how harmful it really is to your financial health and future. (Hint: If it's credit card debt, get on it.)

What's your current income -- and how can you make more?

Naturally, your ability to work toward any financial goal is profoundly influenced by your cash flow. If nearly every cent you earn is tied up in necessary expenses, you won't get far toward either objective, no matter how diligent you are.

The first step is to honestly analyze not only how much you're earning, but where exactly it's all going. If you don't have a line-by-line budget, creating one can be a real eye-opener -- and it may help you discover expenses ripe for cutting.

But in the end, you can only skip so many caramel macchiatos or after-work beers. Finding ways to increase your income will make your quest for financial independence a whole lot easier, as will diversifying it (i.e., finding new income streams so you're not completely reliant on just one). For example, you could try picking up a part-time job. Some side hustles can actually earn you a lot of money.

How stable is your lifestyle?

Nobody can predict the future, but chances are you have some idea of your overall level of financial risk. (For instance: I am a freelance writer and am, nearly always, at least mildly terrified of not having enough work.)

Are you young and in good health, or do you think you may someday need costly drugs and/or medical operations? Have you been with the same company for decades, or are you a fresh new face at a bootstrapped start-up? While emergencies can happen to anyone at any time, you might want to prioritize your savings goal if you're in a financially precarious situation.

While your exact ratio of saving to debt repayment should depend on your personal lifestyle and financial choices, it's always a good idea to have at least a little cash on hand for life's inevitable surprises. And it's easier to repay your debts with gusto when you're not scraping by, paycheck to paycheck.

Want to get a better idea of exactly how big an emergency fund you need? Try this handy calculator. And if you're looking for ways to pay off your credit card debt in a hurry, check out these tips.

And don't forget: Whether it's debt repayment, saving up an emergency fund, or stashing cash for retirement, every penny you can put toward your goal helps -- so no matter what you decide, get busy.