Angular 5 WebStorm Run Configuration

tatsu picture tatsu · Nov 16, 2017 · Viewed 10.3k times · Source

I'm surprised to see Angular does not yet have an entry in Jet Brain's IDE, WebStorm, which run config do you guys use?

I want to execute: ng serve

but Maybe there's a better option?

one like vue's npm run dev which opens up a page in your default browser at the served address?

this page didn't hit run configs, https://www.jetbrains.com/help/webstorm/angular.html

UPDATE :

for clarification I'm talking about making a one click run button like you can for react and vue apps :

enter image description here

Answer

lena picture lena · Nov 16, 2017

Please see https://blog.jetbrains.com/webstorm/2017/01/debugging-angular-apps/ for instructions on debugging Angular apps in WebStorm.

  • right-click your package.json, choose Show NPM Scripts
  • in NPM tool window, click the start script to start the app
  • create a new JavaScript debug configuration (Run –> Edit configurations… –> Add –> JavaScript Debug), etter http://localhost:4200/ into the URL field, press Debug