title: How can I debug deploy.sh when using Kudu to deploy a node.js app to Azure?
body: <p>I am trying to deploy a node.js application (just a simple ghost blog) to Azure Websites using Kudu. I have the following lines in my deployment script (<code>deploy.sh</code>, which is referenced correctly from <code>.deployment</code>):</p>
  
  <pre><code>eval $NPM_CMD install grunt-cli  
  exitWithMessageOnError "Problem Installing Grunt"  
  ./node_modules/.bin/grunt --no-color init
  exitWithMessageOnError "Problem With Grunt"
  </code></pre>
  
  <p>When the deployment fails, I look into the Azure Management Portal and see the log of the failure. I get the expected output when <code>npm install grunt-cli</code> is run - i.e. a warning that it should be installed globally and a list of subpackages indicating that it has installed correctly anyway. Then, directly afterwards I get:</p>
  
  <pre><code>An error has occurred during web site deployment.
  Problem With Grunt
  </code></pre>
  
  <p>The same sequence (with no further information) is in the <code>log.xml</code> for the deployment available from the Kudu deployment dump.</p>
  
  <p>How should I tackle this? Are there any other places I can look for output and errors? Can I change my script to output more error information? Where will it go if I do? Is there some way of testing my deployment script using the Kudu remote console utility?</p>