Another vote for Eclipse (+ gcc and avrdude) here.
I generally do my initial prototyping researchy / play / proof of concept stuff in Arduino because it's fast to get something up and running.
When I know I have a winning approach, I re-write or port it across to bare metal C++ using the Eclipse environment. That way I don't have all the Arduino furniture doing unpredictable things in the background on a production build. I use this combo because it's free and works on a Mac
I tend to not use a debugger with AVRs much, mucks about too much with the timing for my liking.
As with maxspongebob, if all I was doing with that chip was a signal debounce and cleanup I'd be doing it entirely in an ISR for one of the interrupt enabled pins. But whatever works - I can't imagine a whole lot of overtravel even including loop times.
Next challenge is to re-do it with a little ARM, say a coretex M0 or M4, with built-in bluetooth stack. Add a little battery and Qi charging rig for when it's on the tool rack and connect directly with the control computer