Frage

Is there a way to debug Geddy.js (a Node.js framework) applications under Windows?

There is a wiki page on their site about debugging with node-inspector but I guess it won't work on Windows, because it uses signals:

kill -s USR1 3180 
War es hilfreich?

Lösung 2

You can also use WebStorm or IntelliJ as mentioned on the Debugging Wiki Page. Other IDEs might work with a similar configuration.

I tried starting it with the debugger, but I get as far as debugging geddy. You can give it a go. The signal is only needed if the process was started without the debugger, however you can run the following command:

node --debug /usr/local/lib/node_modules/geddy/bin/cli.js or node --debug-brk /usr/local/lib/node_modules/geddy/bin/cli.js

I also found node-inspector-windows looks promising, but I've not tried it.

Andere Tipps

I use Webstorm to develop and debug geddy. You need to write a server starting script that launches the geddy server with no workers like so:

var geddy = require('geddy');

if (geddy.isMaster) {
    geddy.config({
        environment: 'development'
        , workers: 0
    }); 
}   

geddy.start();

Just have WebStorm run "node start.js" [which is the script above] and you can add breakpoints etc.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top