I tried few weeks ago to make the webstorm debugger works, but it didn't. I'm trying again today, but I got the same result.
I'm following these instruction http://www.jetbrains.com/webstorm/webhelp/running-and-debugging-node-js.html#d93421e461
There are my configurations, I actually have three servers (use pomelo.js), one for the web, one as webservice, hosted on the game server and the game-server that basically is not reachable from http request directly. (use the webservice on the port 1500 to reach it)
https://docs.google.com/file/d/0ByzbHcAxmCyvQ1ZqZTFhREpZNGM https://docs.google.com/file/d/0ByzbHcAxmCyvV2JFWkwxTldJNFE https://docs.google.com/file/d/0ByzbHcAxmCyvZnVlYXNNSk4weHM https://docs.google.com/file/d/0ByzbHcAxmCyvN2o1VUhQR3cwX0U
When I click on Run:
"D:\Logiciels installés\nodejs\node.exe" --debug-brk=1337 web-server\app.js
debugger listening on port 1337
But I got nothing if I go on the webpage, just this error:
Code d'erreur : ERR_CONNECTION_ABORTED.
Now, if I run it in debug mode, two debug consoles opened: Debug Web:
"D:\Logiciels installés\nodejs\node.exe" --debug-brk=29855 --debug-brk=1337 web-server\app.js
debugger listening on port 1337
[ReferenceError: Buffer is not defined]
Grunt watcher starting...
*********** Controller Reader ***********
GET/POST/PUT/DELETE => /
GET/POST/PUT/DELETE => /chat
GET/POST/PUT/DELETE => /demo
GET/POST/PUT/DELETE => /login
GET/POST/PUT/DELETE => /game
GET/POST/PUT/DELETE => /subscribe
POST => /game/connect
GET => /mapEditor
POST => /mapEditor/:action
GET => /translate
********* Controller Reader End *********
Web server has started in development mode.
Please log on http://127.0.0.1:1337/index.html
grunt-cli: The grunt command line interface. (v0.1.11)
But if I go on the tab "Debugger" I got a "cannot connect".
The second debug console "Debug Web slave #1": I got nothing on the console but I got "connected to 127.0.0.1:1337" on the Debugger tab.
Sometimes when I try to reach the webpage I got something like this in the webpage:
Type: connect
V8-Version: 3.14.5.9
Protocol-Version: 1
Embedding-Host: node v0.10.24
Content-Length: 0
When I run the Debug mode, the Debug Web debugger tab try to connect to 127.0.0.30xxx, a random port around 30000, but fail and then display the "cannot connect".
Does someone understand what's going on? Because I don't... Thanks.
Edit:
Error: Failed to lookup view "..\views\game\layout.ejs"
at Function.app.render (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\application.js:493:17)
at ServerResponse.res.render (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\response.js:798:7)
at C:\wamp\www\Ayolan\web-server\app\controllers\mainController.js:25:17
at Function.app.render (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\application.js:495:14)
at ServerResponse.res.render (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\response.js:798:7)
at module.exports.index (C:\wamp\www\Ayolan\web-server\app\controllers\mainController.js:13:13)
at callbacks (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\router\index.js:164:37)
at param (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\router\index.js:138:11)
at pass (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\router\index.js:145:5)
at Router._dispatch (C:\wamp\www\Ayolan\web-server\node_modules\express\lib\router\index.js:173:5)