If I had it to do all over, I'd major in compute science and minor in psychology or user experience design. I'd focus my study on automation and artificial intelligence, which is shaping up to be the primary areas of growth in the near future.
I can't speak about your neck of the woods, but it the large majority of the world, UX is very much a viable and emerging field. There are more job openings than can reasonably be filled by experienced professionals in some areas.
Knowing how to code, however, can be very helpful, but it's certainly not a requirement for UX pros. For instance, in my current role as a UX Engineer, they don't allow me in the code base, but having a very good understanding HTML, CSS, JS, and the basics of how our front end interacts with our back end helps me create designs that are viable within our technology stack as well as understand why some pieces won't. It helps me communicate on the same level with our developers, and has given me some "street cred" with our development team.
Additionally, having coding chops means that you have at least two possible career paths-- one in development, and one in UX-- with other options available as well. It'll help keep the most amount of doors open going down your career path.
Another item of note is that while there are certainly a lot of jobs in both dev and UX, there are certainly more developer jobs than UX jobs. What's more, I have some suspicion, though no evidence, that dev jobs are likely far more recession-proof than UX gigs, meaning greater overall career security through even the most difficult economic times.