We discuss the formation of dark compact objects in a dark matter environment in view of the possible mass dependence of pulsars on the distribution of dark matter in the Galaxy. Our results indicate that the pulsar masses should decrease going towards the center of the Milky Way due to dark matter capture, thus becoming a probe for the existence and nature of dark matter. We thus propose that the evolution of the pulsar mass in a dark matter rich environment can be used to put constraints, when combined with future experiments, on the characteristics of our Galaxy halo dark matter profile, on the dark matter particle mass and on the dark matter self-interaction strength.