Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Debugging

mschwartz edited this page · 2 revisions

Debugging

The builtin/v8 object exposes an enableDebugger() method. You may call this from your JavaScript code at start up to enable debugging. The v8 debugger listens on port 5858.

For now, you can visually debug using node-inspector. You'll have to install nodejs and node-inspector...

The httpd server now accepts -d on the command line to enable debugging. Instead of pre-forking, it enables the debugger and calls HttpChild.run().

Run node-inspector from a second command line, after starting httpd-silk.js with the -d switch:

mschwartz@presto:~/src/othello$ node-inspector 
   info  - socket.io started
visit http://0.0.0.0:8080/debug?port=5858 to start debugging

Now point your webkit browser (e.g. Chrome) at the URL printed by node-inspector. You should see something like the Chrome Dev Tools window in your browser. The scripts tab will show all your server-side scripts. Breakpoints work, etc.

Something went wrong with that request. Please try again.