简体   繁体   English

在Docpad中,如何使用节点Webkit代理调试和检查服务器端对象?

[英]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. 我想要找到的最快乐的地方是让我使用Chrome的工具来检查服务器以及客户端对象的地方。 In the past, I have had success in following the "Profiling with Node Webkit Agent" instructions on the Debugging page of docpad.org. 过去,我成功地遵循了docpad.org的“调试”页面上的“使用Node Webkit代理进行分析”说明。 With latest versions of docpad, however, I can't seem to get this configuration running. 但是,在最新版本的docpad中,我似乎无法运行此配置。

What I'm doing 我在做什么

  1. Run 'docpad --profile run' 运行'docpad --profile run'
  2. Run 'lsof -n -i4TCP:9778 | 运行'lsof -n -i4TCP:9778 | grep LISTEN' to find the docpad process id grep LISTEN'查找docpad进程ID
  3. Run 'kill -SIGUSR2 [process id extracted from result of 2]' 运行“ kill -SIGUSR2 [从结果2中提取的进程ID]”
  4. Open node webkit interface provided through link on Docpad Debug page 通过Docpad调试页面上的链接提供的开放节点Webkit界面

Results 结果

Running the kill command in step 3 above seems to simply be killing the docpad server. 在上面的步骤3中运行kill命令似乎只是在杀死docpad服务器。 And I haven't been able to get anything except a 'Detached from Target' message when opening the node webkit interface. 打开节点Webkit界面时,除了“从目标分离”消息外,我什么也没得到。

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. 我也尝试过运行“ docpad-debug run --global”,但不清楚如何使用它来通过节点Webkit代理启用调试。 Any help much appreciated! 任何帮助,不胜感激!

I just used the official node-inspector debug instructions for docpad and it worked fine. 我只是为docpad使用了官方的节点检查器调试说明 ,所以效果很好。 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. 我会做同样的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM