Has anyone got any experience in creating node.js applications in the windows azure sdk for node.js?
I have done these tutorials:
https://www.windowsazure.com/en-us/develop/nodejs/
but now require debugging enabled to step through code and fix errors etc.
I tried to turn on iisnode debugging using:
<iisnode
debuggingEnabled="true"
loggingEnabled="true"
devErrorsEnabled="true"
/>
but when i navigate to: 127.0.0.1:81/server.js/debug I get a 404 file not found error. Is there something special to do in the case of windows azure emulator to get the debugger to work ...
any help or advice would be appreciated.
a step by step instruction would be helpful if possible.
Cheers
IISnode has two versions, a 'full' and a 'core' version. The 'full' version conatins hooks to node-inspector, which allows you to debug using the debuggingEnabled configuration string you mention by browsing to /debug
Unfortunately, only the 'core' version is installed by default with the Windows Azure SDK for node.js
You can download an MSI and install the full version from the iisnode repo:
https://github.com/WindowsAzure/iisnode/downloads
Then you should be able to browse to http:///debug/ to debug your web app in node-inspector (using a WebKit-enabled browser like chrome or safari).
-Mark
Not sure about debugging natively with the Azure Tools (Emulator) but Cloud9 IDE http://c9.io/ offers extensive Node.js debugging features and also native support to deploy to Azure...
HTH
Update, I think you might need to do it the old fashion way with debug messages (see below), I personally would give Cloud9 IDE a bash
console.log(“my debug message”)
Node Inspector (Chrome/Safari/FireFox)
If you are using WebMatrix 2 to develop your Node.js app then you can download the Debugging Extension for Node.js. This will install the needed files and add a Debug button to WebMatrix. Just search for 'Debug' in the Extension Gallery to download and install the Node.js Debugging extension.