Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt Server and WebStorm javascript debugging (and SpyJS) not working

I have an app that I made with yeoman, grunt an angular JS (typical setup - image included below). I'm trying to debug my project with spyjs (or even regular javascript debugging) but I can't seem to get it working when I run "grunt serve" - the file that's loaded from WebStorm clearly isn't going through the grunt server (but localhost:63343 instead). Any ideas how I could configure things properly to get debugging to work?

My WebStorm/ AngularJS Setup

Here's my SpyJS configuration:

My SpyJs Configuration

I've also tried localhost:9000 for the URL to trace (which is the port that grunt serve runs on), and I've tried using another node interpreter.

like image 753
Rob Avatar asked Nov 21 '25 22:11

Rob


1 Answers

You need using the server your client code runs on (localhost:3000) and not WebStorm built-in webserver to debug your Angular application served by Grunt. See Debugging grunt with Intellij for some hints Note: haven't tried this with spyjs - only with a regular debugger

like image 117
lena Avatar answered Nov 23 '25 13:11

lena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!