What Terminal Services has common with debugging?

Reading Time: < 1 minute

Hmm ..since today I would answer to such question "nothing"? But if this answer was so easy probably You would not see this post – so answer is not so easy.
Today I've started some test on MIIS project I'm working on now and I've wanted to debug some metaverse extension wrote with C#\VS 2005. First step – attach to MIIS process, should be easy – but it wont't. Instead of nice dialogue window with process list I've got error message which states that my IDE can't connect to debugger on my machine and "handle is invalid". What the heck?
So I've started to checking all the things like if debugger sevice is up and running – it was, any other service which may have something to deal with debugging – everthing was fine. It took me a little more then hour to start looking for solution on the web (yes, I know, it's a shame for me, my first step should be MSN\google).
It turned out that VS .NET 2005 Remote debugger requires Terminal Services up and running on machine to work correcly – ???? I found this information on greggm's WebLog, and it turned out that debugger is using TS API call to get list of running processes. I know that this has some justification but if it has to be in this way maybe it should be nice to put TS as a requirement for debugger service?? That's why dependencies in services are for (or I'm thinking that dependencies are for such pourposes).
So it turned out that it was my fault because I've disabled TS on my machine … if you will came across handle is invalid message with debugger – just be sure to check if Terminal Services are up and running.