Fix a whole slew of issues with debugging in general, and remote and Azure debugging in particular (#776, #780, #787 and various unfiled).
The big change here is that Azure debugging now always uses SSL, because non-SSL websockets don't fare well when passing through firewalls. This also adds low-level logging to the websocket proxy that is disabled by default, but can be enabled to diagnose issues: as it proved useful while investigating this problem, I decided to keep it in.
Another change to web proxy serializes attach requests, since Node can only handle one at a time. This helps with the occasional race condition where the dropping of the first connection (used to enumerate node processes) was not detected by the proxy before the second connection (used for actual debugging) came in - now the second connection won't actually try attaching to Node until the first one completes.
Where connections were dropped, more code is added to ensure that this is done as gracefully as possible, so that the other side can properly detect it without relying on timeout.
Various other fixes are mostly one-liners that properly handle nulls in places where they weren't before, add timeouts to infinite waits that can potentially never resume, and handle race conditions.
↧