1

Resolved

Attach debugger to azure web site error when sockets are disabled

description

Here's the error you get when trying to attach to a web site, using server explorer Attach Debugger (Python), when you haven't enabled web sockets:
---------------------------
Error
---------------------------
Could not connect to remote Python process at wss://av5f3jwpnoq@hvbottlepolls2.azurewebsites.net/ptvsd. Make sure that the process is running, and has called ptvsd.enable_attach().



Additional information:

Unable to connect to the remote server

The remote server returned an error: (503) Server Unavailable.
---------------------------
Retry   Cancel   
---------------------------
I believe in NTVS we tell the user to check that web sockets are enabled, as one of the possible reason why we couldn't connect. Could we do this here as well? I expect that forgetting to enable web socket will be pretty common.

comments

pminaev wrote May 22 at 7:56 PM

I think we can actually do even better than NTVS does currently, and bring up the message about web sockets specifically for this error (i.e. when InnerException chain ends with a WebException with HTTP status 503).