I think the best way to make this decision would be to consider the time commitment -- for a PhD you're committing 5-6 years, for a Master's you're committing about 2 years. Consider how long you want to pursue a single or a narrow range of research topics, and what you plan to do with your degree afterwards. Depending on what career you're aiming for, getting a Masters and gaining 3-4 years of industry experience may put you on par or even above where you might be if you had gotten a PhD with that time instead.