没有打破Geddy的断点 [英] No breakpoints are hit with Geddy

查看:105
本文介绍了没有打破Geddy的断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我评估了$ code> node.js 的Geddy MVC框架,我看到一个奇怪的问题 - 调试时我的断点都不会被打击。

Im evaluating the Geddy MVC framework for node.js and I am seeing a strange issue - none of my breakpoints get hit when debugging.

我正在使用WebStorm在调试模式下启动 node.js

I am using WebStorm to launch node.js in debug mode.

我不知道如何让Geddy在调试模式下使用CLI命令启动,所以我有一个我使用的引导文件,如下所示:

I dont know how to make Geddy start in debug mode using the CLI command so I have a bootstrapper file that I use that looks like this:

console.log("Starting server...")
var geddy = require("geddy/bin/cli")
console.log("Server started.")

我在所有三行上设置了一个断点,只有最后一个 console.log 被击中,所以至少我知道断点和调试工作正常。

I set a breakpoint on all three lines and only the last console.log gets hit, so at least I know that the breakpoints and debugging is working properly.

Geddy内部 require()是我的控制器,他们还在几个位置设置了断点。这些不会受到打击,但控制器确实可以正常工作,HTTP请求也可以正常运行。

Geddy internally require()'s my controllers who also have breakpoints set in several locations. These never get hit, but the controllers do work properly and the HTTP requests are served properly as well.

有没有任何理由为什么断点不会在Geddy中受到打击?有没有什么可以做的?

Is there any reason why breakpoints will not be hit in Geddy? Is there something more I can do?

推荐答案

我无法验证这一点,但我相信这个问题是由于事实上, cluster 产生新进程,但调试器不知道它们。我没有找到一种将调试器附加到新进程的方法,甚至不知道是否可以在打开调试端口启动调试程序。

I have been unable to verify this, but I believe the issue is due to the fact that cluster spawns new processes but the debugger is unaware of them. I have not found a way to attach the debugger to the new processes, and im not even sure if they can be started with the debugging port open.

Geddy使用code> cluster 所以它继承了这个问题。

Geddy uses cluster so it inherits this issue.

这个线程提到了一个可能的解决方案:
如何在运行GeddyJS时启用--debug for node.js ),但这并没有帮助我。

This thread mentions a possible solution: ( How do I enable --debug for node.js when running GeddyJS ) but this did not help me.

这篇关于没有打破Geddy的断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆