0

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!

8ken
  • 15
  • 4

1 Answers1

0

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.

balupton
  • 47,113
  • 32
  • 131
  • 182
  • Yes, works fine. I had steered away from the node-inspector instructions because they seemed to indicate that inspector was kind of fickle, and this agreed with other commentary on the web to the effect that it was old and unmaintained. As I had previously been able to debug per the 'Node Webkit Agent' instructions, that's the configuration I was trying to get running again. Could you clarify on the difference between the 2 debug methods ('Debugging With Node Inspector' vs. 'Profiling with Node Webkit Agent')? Should the 'Profiling...' instrucs. be removed since they no longer seem to work? – 8ken Nov 19 '13 at 16:17
  • I was having problems with this, the key was to directly invoke the local copy of docpad (as indicated by the instructions). I think what happens is the global docpad will just start a separate local docpad instance if it exists, so if you just do "docpad-debug run" you won't be debugging the instance that's actually running your site. – Screndib Oct 22 '14 at 15:00