mvermand
mvermand

Reputation: 6117

How can I debug an Angular website started with grunt serve inside WebStorm?

I am trying to debug my AngularJS site from within WebStorm. The site is served with "grunt serve". I have the Jetbrains IDE support plugin installed in Chrome and it is configured to work on the default port 63342.

I use

In Webstorm I created a run-configuration of type JavaScript debug. In there I have put:

When I run grunt serve, my site starts in chrome. When I hit the debug button for the JavaScript debug configuration, The debugger window shows but after a while a popup says "Waiting for connection from JetyBrains IDE Support extension" from Chrome. Please ensure you have installed..."

I also do not get the yellow popup in Chrome telling that the Jetbrains IDE Support extension is functional.

When I go and look in the console for _generated_background_page.html of the Jetbrains IDE Support extension, I see the following message:

IN [21,"Debugger","attach",["http://localhost:9001",true]]

But then nothing happens anymore.

Does someone have a step by step manual on how to debug an AngularJS site ran with Grunt serve from within WebStorm?

Upvotes: 0

Views: 553

Answers (1)

mvermand
mvermand

Reputation: 6117

I found it: I needed to change the host setting in the options of the Jetbrains IDE Support extension. It had the value of "127.0.0.1" and when I changed it to "localhost", things started to work out!

enter image description here

Upvotes: 1

Related Questions