I received my Ph.D. a little over a decade ago. I didn't succeed in getting a research job outside of academia, and the bit over a decade that I spent in academia convinced me I didn't want to be a part of it. As a result, my fancy piece of paper sits, completely unused, in a closet.
Whenever someone points out that I wasted numerous years of my life with nothing to show for it but a low salary history, I have to admit that I absolutely do not regret getting a Ph.D. I loved the work, and I loved the process of doing the work. I'd do it again (if I didn't have to pay for it again---I worked full time during grad school, which I recommend no one do).
So, yeah, don't go for a Ph.D. in computer science unless you absolutely cannot not go for a Ph.D. in computer science. And then, don't expect it to pay off in any way.