Speech Server Debugger Times Out - How Frustrating !!!!
Have you ever run into this issue?
You write some managed code, set a breakpoint in the code, run the debugger, code stops on the breakpoint. While in the middle of intensely analyzing variables etc, suddenly....without warning....bloop...the debugger times out and stops. Visual Studio is reset to the non debugging state and you sit there frustrated that you didn’t find the problem with the code. So you start the debugger again etc, etc, etc...
I have been putting up with this behavior for 3 years now, and quite by accident I stumbled upon the solution. So for anyone else who may be fed up with the debugger timing out, here is what you can do about it.
First a little explanation about what is happening.
Apparently IIS periodically pings your worker process in order to ensure that it is still responsive. By default it will be pinging the process every 30 seconds, and the process will have 90 seconds to respond. If it doesn't respond in time it is terminated. This may be fine for a production or test machine as an application pool that has hung will be reset, but it is not great for a development machine.
What is happening is when you hit your breakpoint in the debugger, all execution stops, pending requests are not served and the worker process freezes completely. Of course since the worker process is frozen, it won’t respond to the pings from IIS and after about 90 seconds or so everything gets reset.
Here is what you can do to get past the problem...
- In IIS Manager, right click on the 'Speech Server App Pool'
- Select 'Advanced Settings
- In the 'Process Model' section, change 'Ping Enabled' to False
That’s it...I started the debugger, walked away, came back 30 minutes later and the debugger was still engaged...no more time outs....
Simple solution to a 3 year old aggravation
Hope this helps someone out along the way