What do you do if you have developments on your paper during the long peer review process?
Wait until the first revision to introduce this changes and let the editor know that you did not exclusively modify your original manuscript based on the reviewers comments?


Yes, that's the most common thing to do.  

Of course, if the paper is rejected, then you can incorporate the changes before submitting somewhere else.

If the new developments are dramatic, then you may instead decide to leave the original paper alone, and write a separate paper with the new work.