Debugging Grunt Server and WebStorm (and SpyJS) not working

I have an application that I made with yoman, grunt angular JS (typical setup is the image below). I'm trying to debug my project with spyjs (or even regular javascript debugging) but I can't seem to get it to work when I run "grunt serve" - ​​the file downloaded from WebStorm is clearly not going through the grunt server (but localhost: 63343) ... Any ideas on how to properly configure the files for debugging to work?

My WebStorm / AngularJS Setup

Here's my SpyJS config:

My SpyJs Configuration

I have also tried localhost: 9000 for tracing the url (which is the port that the tracing is running on) and I tried using a different node interpreter.

+3


source to share


3 answers


You need to use the server that is running your client code ( localhost:3000

) and not the built-in WebStorm web server to debug your Grunt-served Angular app. See Debugging grunt with Intellij for some tips Note: haven't tried this with spyjs - only with a regular debugger



+1


source


You need to upgrade to Webstorm 9. According to spy-js

Node. Js tracing is now supported in WebStorm 9 EAP, including support for multiple processes and node.

Then, instead of using a profile, Spy-js

use a profile Spy-js for Node.js

.



This screenshot is from Webstorm 9 RC.

enter image description here

+1


source


I am also using Yeoman generator (AngularJs + grunt) and I am debugging the application using JavaScript debug config like this:
(source: ignaciosuay.com )

Have a look at this post on how to debug angularJS with Intellij (it should work for web storm too)

+1


source







All Articles