Here's my perspective: I worked in advertising for about 10 years. Most of the time I was a project manager officially and a technical project manager unofficially, because I always enjoyed working with technical projects, so I ended up with the big web builds.
It took me about 8 years to go from junior PM to project director. When I had reached project director level, I noticed that things changed. I was managing people most of the time and putting out their fires by navigating political structures in the company to get resources allocated to those fires.

I stopped enjoying it at that point. I tried two more stints as a lower-powered PM at other agencies, but realised that I also couldn't really deal with having someone with less experience force me into managing my project in a way that wasn't right.

So I decided to become a dev instead. Being a lower-powered PM helped with that, as I now had time and energy to learn coding on the side. That wouldn't have been possible as a project director.

About 4 years in, I'd say it was a very good decision to make. I was apprehensive at first, because I once turned another passion into a job and that immediately killed the passion and I haven't touched that passion since. However, in this case, things stayed interesting enough.

Advantages to being a PM:

- You get to see every part of a project

- You are not just a resource delivering a skill

- You get to manage your own time a lot more

- Micro-managers breathing down your neck are much rarer

- Your skill is universal, so you become employable in many places

Disadvantages to being a PM:

- Any good PM will eventually come to the realisation that the best PMs run teams that don't need PMs haha

- At the end of the day you will often ask yourself how you can simultaneously be completely burned out while also not being able to tell what the heck it is you actually did all day

- Politics. Endless politics. The higher you go, the worse it gets.

- Clients. They ruin everything

- After about 6 months you stop learning. Yes, you might gain some peripheral knowledge of the industries your clients are in, but the principles of project management are learned after your first trial-by-fire project and then that's it. Rinse repeat for the next X years your career will run for

- That feeling when the higher-ups tell you half your team will be based in [popular outsourcing country], because they've struck a deal with some outsourcing-sweatshop (which they will only do once, because of the inevitable disaster this will become, but you're the guinea pig for the experiment, good luck!!)

Advantages to being a dev:

- You learn stuff

- The work feels more real

- Less politics than a PM role. Still politics. And still, the higher you go, the worse it gets, but it's less by necessity

- You get to focus on one part of a project and do that really well

- The pay is ridiculous

- You don't have to talk to clients (this is a big one)

- Remote dev work is a heck of a lot easier than herding your remote cats as a PM

Disadvantages to being a dev:

- You don't feel in control and you are at the mercy of your shitty PM mismanaging project scope which means you get crunchtime, but the PM doesn't

- Other devs' shitty code (and by that I mean the freelancer they hired at £600 per day for 3 weeks who DGAF about maintainability)

- The work you are given will sometimes be mind-numbing, as the client's changed their mind in a completely nonsensical way for the millionth time, but needs to see a working demo in two days etc...

- Employability becomes a really weird game of 'does the automated HR system think the buzzwords in my CV match the buzzwords on the job description', followed by grinding meaningless array-juggling puzzles which you will then never use again in any real world coding situation (aka, finding a good dev job is much, much harder than finding work as a PM)

There ya go, that's my experience so far.