I was the moderator that deleted the comments from that thread.
Bottom line, you had a chat conversation with a user in a closed question without either you or the user taking the time to edit any pertinent information into the question so it could get re-opened and you could get proper credit (and help the site out by editing the question into shape), and that chat conversation was so long and involved that no one could be expected to follow it to get their answer.
The comment thread was so long and convoluted to an outsider that it wasn't helpful at all for a random visitor; and neither you nor the OP took the time to edit the question to make all that live debugging useful to someone else. In short, it was 36 comments that were of no use outside of the two of you, and the two people who stood the best chance of editing the question with that information chose not to.
That's why that conversation was deleted.
If you want a conversation to stick around, have it in chat or edit the appropriate parts into a post that is meant to stick around.
If you help a user that has no intention on cleaning up their question to make it useful for others, you do so at the risk of losing all your work.
This has happened to you more than once because you're actively working against the system. We're not a help forum, we're a Q&A site. We expect a certain level of information in the question so that the question can help more than one person. We close questions that don't meet this criteria because we know from experience that they aren't going to make the site a net good experience for others.
We have a term to describe question askers that make no attempts to improve their question but just want someone to help them debug it: Help Vampires.
Don't help a help vampire. If you see a closed question and you answer it in the comments, you're just exacerbating the problem, and causing yourself a lot of grief in the process. Use your energy and talents where it's most effective and you won't encounter this issue.