Depending on the timespan your are talking, this problem has many answers. For a short to median time span (say, fewer than 10 years), other experts before me have given excellent answers. For me, I would like to answer the question with a lifelong timespan. I read a survey many years ago mentioning that a high percentage of civil engineering graduates still worked as civil engineers at age of 55 or higher, whereas the percentage was much lower for computer programmers. I have no intention to raise a debate about programmer's age. I simply want to point out this fact. From the survey you should know that you have a higher chance to change your career type (from programmer to others). Certainly, if you have determination, you still can work as a programmer till retirement. Good luck.
The first engineering lead I worked under had a saying: "it's a marathon, not a sprint."
That's easy to hear but hard to understand. There will always be more to learn, more to fix, more to improve - and that is GREAT. But it's also a balancing act. You will be able to sprint at times and need to slow down at others. New tech/approaches/ideas/learning comes around all the time and that is fun and rewarding, but it's also necessary to keep it in perspective. Take time for yourself and learn when it's good to walk away from a problem. Every programmer I know will tell you how they magically find answers to difficult problems when they're able to walk away from them (shower epiphanies are a regular thing for me). It's good to recognize when you're down that path and be able to take a break.
This advice also applies to how you care for yourself. Most computer professionals sit in front of a desk all day. Take time to stretch and exercise and eat right. It will make a big difference in the long run.
This depends heavily on your personality, but the worse parts about my job are those that don't involve programming at all. Sometimes there is lots of paperwork to do. Sometimes there is a lot of testing to do to satisfy auditing requirements. Understanding business logic can be challenging because it is often complex and you won't ever be able to learn and/or remember all of it, but it is always a necessary part of the job.
Moving onto some problems that do involve programming, sometimes you encounter code that is just plain unreadable, poorly architected, or inefficient, and you may feel compelled to do something about it, but maintaining code written by someone else is a task that all programmers will encounter some time in their career, and usually it isn't as enjoyable as writing new code.
All that being said, I don't think I'll ever switch careers. Being a programmer is just too much fun.
I hope this answers your question!
I think John's answer is spot on. In all the years in my field, I have rarely seen engineers (either who worked for me or with me) dislike the coding/debugging/testing/troubleshooting itself. Generally what tends to cause issues for engineers (and others in any career) is the culture of the company. Your direct manager has the biggest impact on your job satisfaction along with your peers. If you have a great manager than you will likely be happier (and if that manager is effective and working in a good culture, you will code more and spend less time on the bureaucratic stuff like attend meetings). I've been in situations where my manager cared more about advancement than engineering a great product. In fact, whenever I have been on a team where career advancement and competition was more important than building a great product, unhappiness was the norm. So, I typically advise people to learn about the company, the job and the people in addition to the fundamentals of being a good engineer (doing internships is a great way to learn about companies and what to look for when job searching).