Debugging with NodeJS

27
Jul

I've found debugging to be tricky with Node, until today. Running with the `--inspect` flag is pretty cool, mind you it's "experimental" and "may be disconued at any time" !

Recap: `$ node --inspect yourFile.js`

Then node will give you a CHROME-ONLY url to debug your script. I highly recommed enabling the auto-break feature in the inspector tools. If you're not familiar that, look at pausing on exceptions in chrome.

Also, here's a good tip for reusing the same web debug session without have to copy/paste the inspection url every time

written by jackson

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
Complete this form and then pat yourself on the back.