How to handle communication about the class outside of the official channels, when I am a TA for a class that a friend is taking?
It sounds wise to steer your friend towards your office hours, although there's probably no need to insist on this.

However, I would not give additional assistance with debugging beyond what you would do for anyone else.  The most important thing is for your friend to learn how to do his own debugging!

There's one more thing you can do: fill your professor in on the situation before the semester starts.  And then, as the semester unfolds, if any specific dilemma or uncertainty arises, ask the professor for guidance.

That is my offhand take on this.  However, when you speak with the professor, s/he may have more specific guidance.