2016-02-12 55 views
0

我跟隨此帖子Debugging Node.js Azure Web Apps並相應地設置了我的環境。Azure上的Node.js遠程調試

看起來像「mysite.azurewebsites.net/server.js/debug」連接到服務器並加載腳本,但Websocket連接返回。

Overrides.js:17 WebSocket connection to 'ws://mysite/server.js/debug/ws' 
failed: Error during WebSocket handshake: Unexpected response code: 500 
2016-02-12 15:14:20.147 Overrides.js:27 EventonWebSocketError @ Overrides.js:27 

回答

1

當前您可以使用iisnode-inspector.dll的舊方法。在iisnode.yml中設置debuggerExtensionDll: iisnode-inspector.dll,用於通過iisnode調試node.js腳本,如issue#388所示的解決方法。

另外,您可以利用Azure Web Apps上的VSO擴展,它提供了一個在線編輯器和cmdlet工具。您可以參考this thread on MSDN

0

您是否從Azure門戶啓用了WebSockets? WebSocket默認是禁用的,必須手動啓用。

+0

是的我按照帖子所示 –

0

似乎Azure上最新的Node Inspector可能有問題。請嘗試以下操作以返回到早期版本。在你的web.config,設置此:

<iisnode debuggerExtensionDll="iisnode-inspector.dll" /> 

此外,您還可以關閉的WebSockets與舊版本,因爲它並不需要它。