I was asked which I prefer; New Development or Debugging. I used to say New Development because you get to create and design and plan and build and interact with the customer first-hand. Now I say Debugging because there is no downside, no liability, only rewards and praises. But it could also be said that I need to get out of my comfort zone.
When developing new products you have a clean slate and that is the double edged sword: you get to create fresh, you also get blamed for picking a bad architecture. When debugging existing code you have to work within the existing framework and that is the double edged sword: you have to work with the mess, the bad ideas, the junk code of your predecessors but when you fix a bug you get accolades and kudos.
You can make a living doing either one and if you live long enough you get to do both with the same code base: fix your own bugs. That is humbling and educational.
There is refactoring: rewriting code that was once good but is now no longer viable. Just don’t break anything.