1

Resolved

Ping Azure website over HTTP before trying to attach to it

description

Publish to an azure web site, debug configuration
In server explorer, choose Attach Debugger (Python)
You'll get an error because you haven't enabled web sockets yet, do not dismiss the error yet
Enable web sockets in the portal
Back in VS, click on Retry

You'll get this error:
---------------------------
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:

An internal WebSocket error occurred. Please see the innerException, if present, for more details. 

An internal WebSocket error occurred. Please see the innerException, if present, for more details. 

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

An existing connection was forcibly closed by the remote host
---------------------------
Retry   Cancel   
---------------------------

comments

huguesv wrote May 22 at 7:11 PM

Got it to work after refreshing the web site. In NTVS, I think we handle this by pinging the web site to ensure the process is running. Can this be done here too?