Search code examples
node.jsdocpadnode-webkit-agent

In Docpad, how can I debug and examine server-side objects using node webkit agent?


The happy place I'm trying to get to is one that lets me use Chrome's tools to examine server- as well as client-side objects. In the past, I have had success in following the "Profiling with Node Webkit Agent" instructions on the Debugging page of docpad.org. With latest versions of docpad, however, I can't seem to get this configuration running.

What I'm doing

  1. Run 'docpad --profile run'
  2. Run 'lsof -n -i4TCP:9778 | grep LISTEN' to find the docpad process id
  3. Run 'kill -SIGUSR2 [process id extracted from result of 2]'
  4. Open node webkit interface provided through link on Docpad Debug page

Results

Running the kill command in step 3 above seems to simply be killing the docpad server. And I haven't been able to get anything except a 'Detached from Target' message when opening the node webkit interface.

I have also tried running 'docpad-debug run --global' but am unclear on how to use this to enable debugging through the node webkit agent. Any help much appreciated!


Solution

  • I just used the official node-inspector debug instructions for docpad and it worked fine. Would you be able to do a screencast of what is going wrong? And I can compare it step by step with the results I'm getting. I'll do the same.