title: Debugging node.js with Express Framework: Troubleshooting missing res.end
body: <p>The Express node.js server application I'm currently developing will sometimes go off into the void and stops returning requests. I very much suspect somewhere in it I am doing something that is ultimately skipping a res.end that I need to be doing.</p>
  
  <p>Does anyone have any tips or tricks on how to best go about looking for where I'm missing the res.end (assuming that's the problem)? Is there anyway to view the currently open requests in real time in the node event loop?</p>
  
  <p>When things hang up, everything is still running in that Express will still accept incoming requests. And, these requests are logged to the console via express.logger just fine. But, the request is never returned to the client and no error is being thrown.</p>
  
  <p>Thank you in advance for your thoughts.</p>
  
  <p>Follow-up:</p>
  
  <p>There doesn't seem to be much documentation on node's debug mode beyond the raw API docs. I did find <a href="http://www.100percentjs.com/best-way-debug-node-js/" rel="nofollow">this article</a> which seems to provide a good overview of several options. But, there doesn't seem to be the kind of thing I was thinking of for watching the event loop, something a la <a href="http://parall.ax/vtop" rel="nofollow">vtop's process list</a>.</p>
  
  <p>More Follow-up:</p>
  
  <p>Yesterday, Daniel Hood published <a href="http://fullstackforum.com/software/2014/08/28/debugging-in-nodejs-part-1-the-basics/" rel="nofollow">Debugging in Node.js</a> stating that, "The state of debugging node.js apps has always been a bit unfortunate..." So, perhaps my question is not so silly as to merit down votes as it might seem. Anyway, in his next article he promises to cover some tools for debugging asynchronous operations. </p>