【问题标题】:Can't remote debug a Python web site in Azure with vs2013无法使用 vs2013 在 Azure 中远程调试 Python 网站
【发布时间】:2016-06-08 11:40:57
【问题描述】:

我在 Azure 上部署了一个瓶子网站,但它显示 500(内部错误)并且我看不到日志。我参考https://github.com/Microsoft/PTVS/wiki/Azure-Remote-Debugging 来调试我的项目,但它失败了。 它显示如下错误消息。

could not attach to python.exe process on Azure web site at testpybottleapp.azurewebsites.net. 
Error retrieving websocket debug proxy information from web.config.

当我尝试打开http://testpybottleapp.azurewebsites.net/ptvsd 时,它显示ptvsd not existed

【问题讨论】:

标签: python azure remote-debugging ptvs


【解决方案1】:

您是否也考虑过使用VorlonJS?这是一个远程网站调试器,在这种情况下可能会有所帮助。

或者,您能否尝试从VMDepot 获取类似的虚拟机,然后上传,看看是否有同样的问题?这可以帮助我们排除故障并了解问题是出在 VM 本身还是配置设置之一。

【讨论】:

    【解决方案2】:

    如果我们想在 Azure for python 网站上使用远程调试,我们应该将发布模式设置为“调试”。然后我们应该启用 websocket。

    同时我建议您可以尝试使用 debug=>Attach to Process 并输入 wss://WSGI_PTVSD_SECRET@WEBSITE_NAME.azurewebsites.net/ptvsd。当显示进程(Python.exe)时,您可以单击“附加”。然后您可以在浏览器中打开您的网站 http://WEBSITE_NAME.azurewebsites.net。

    如果您访问“http://mysite.azurewebsites.net/ptvsd”之类的 URL 并收到“ptvsd not exists”错误,请仔细检查以下几点:

    1. 您应该将网站发布为调试模式而不是发布模式。

    2. 确保本地的“WSGI_PTVSD_SECRET”与Azure网站一致。

    【讨论】:

      猜你喜欢
      • 2016-06-09
      • 2014-04-26
      • 2015-05-30
      • 1970-01-01
      • 2014-05-29
      • 2016-10-07
      • 2012-11-14
      • 2013-11-21
      • 2016-03-17
      相关资源
      最近更新 更多