How to avoid getting emotionally attached to my students' projects? I run a workshop with a few students. They often do large projects alone that they inevitably run into trouble with. That's completely normal, it's why they need some help in the workshop.

As the instructor, I usually spot the issue and solution pretty quickly. I try and nudge the student in the correct direction, but they don't always get it. After a while, I become personally invested in the project, and I may end up just implementing the fixes I suggest myself (while they watch), and because they aren't responsible for the implementation, they gain less that than if I had let them do it. This happens especially when I help them with the initial design and architecture of the program, as I end up feeling a little like it's mine too.

How can I make myself pull back a little and not do the work for them?
I think this an essential and main part of teaching programming and cs (and teaching in general). The ability to hold the answer and guide the student to it.

What I do is try to follow the thought process of the student. When working with them to help them find the problem, I ask various questions (usually "what do you thing is causing this?" etc.) and by their answers it's possible to see what sentences would guide them to the solution. 

This method works great (that sound out of the sky but it's based on student feedback) as it allows the student to feel that they found it on their own. I find that they also learn to spot issues on their own afterwards. 

Additionally, it's worthwhile remembering that you are the instructor, and not the student. And that the project is a student's project, so keeping that in mind often helps with holding back from doing the work yourself.

However when all else fails, showing the students how you might do it could be a last (last) resort. Just be sure to explain every step you're doing, so that the student understands. I cannot express enough how bad this last resort is. But if it gets to that, make sure you're not doing their work, but rather show them something similar