To stay out of debt, track your money properly every day. If you're looking for a simple, free program to keep tabs on your money, give Accounts & Budgets Free a try. It's not a personal-finance heavyweight, but for keeping track of money coming and going out of a single account, and creating reports, it's a solid bet. Input every transaction in your account, and you'll be able to easily track all your money by category, such as for food, car expenses, insurance, and so on. You can also create visual reports, do budget planning, create reminders, and more.
Accounts & Budgets Free will manage only one account, but there's a for-pay version that will handle more accounts. Note that this program is from a French developer, and so the translations aren't always ideal. Still, it's easy to figure out despite the sometimes awkward language.