It's frustrating and makes me often give up. I work in Ops, so it's not a day to day thing for me to write any code. Thankfully with all of the fires and different things to work on in Ops I think it's a very good fit for an ADHD person.
Ops I think can be great for this personality type. But it really depends on the exact ops job, and the person in question. Some ops jobs are more flexible than others, and I think flexibility is really what matters the most. I was an extremely productive sysadmin when I did that as my dayjob, but if you asked me to show up during any block of 8 contiguous hours we were going to have a bad time. If I could randomly show up at 3am to hack out that task I just remembered it was a great fit, since you'd get far more work out of me overall.
Debuggers or things like Sentry and Honeycomb. Basically everything that gives me runtime insights to the software.
Using static types and tests to ensure every dumb change I make gets caught somewhere.
This is one of the reasons why I will refuse a job title that is greater than senior engineer. I know in my heart of hearts that being a staff or lead engineer will be bad for everyone. I'm not even particularly stellar as a senior engineer, but I can at least sustain it.
Reaching this point can be astonishing to the undiagnosed ADHD programmer. For the first handful of years into their career, their shortcomings were either dismissed as inexperience or covered for by coping mechanisms. In my experience, the coping mechanisms start to buckle once you're a senior level programmer.
Get a diagnosis ASAP if you suspect you have ADHD. Medication and other things can definitely help. I also think there's nothing wrong in figuring out just how much mental capacity you have to give to your job and not exceeding it, even if that means rejecting prestige.