A programmer is a developer. Some programmer do architectural work, others just implement what is needed to implement. I think you are conflicting the term with "Designer". But still, a programmer can also work on their own and even, get this, design the software. Actually lot of people do. A programmer is not a hammer, that is shaped and used the same across all usage. A programmer can be a hammer, but some can also be a pliers.
Developer just means someone who develops stuff. That's all to it. It can be a programmer, it could be someone who designed how the commandline interface works and creates an API without programming code, it can also be someone who game developer who creates 3D assets for a character, it can be UI designer; they are all developers, a programmer is just a subset of developer. A programmer does write documentation and debug, without too much guidance. I argue its part of the job of a programmer.
There are programmers who just produce code, and programmers who do all the other mentioned stuff. Both are developers.