I encounteresd this years ago and do not remember what the problem or solution was.
Have a Putty vty session established to a remote router, launch a debug that is populating the session with a lot of text, then suddenly, the session disconnects.
I cannot recall what the problem was, but I am thinking it had to do with a character in the session that the emulator didn't like.
Is anyone familiar with what I am describing?
I wonder if the problem might be the inactivity timer on the vty. The putty session may be receiving lots of output data, but if there is no input (which is usually the case when you are just watching the debug output) then the inactivity timer kicks in and terminates the session.
Conditions: This symptom is observed when large chunks of data are transferred in the SSHv2 session, for example, when the show tech command is entered and the command output is transferred in the SSHv2 session.
We are also seeing this problem in recent 15.x versions of IOS.
This is an annoying long term problem and needs to be fixed.