11

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

tatsu
  • 2,316
  • 7
  • 43
  • 87
  • 1
    Work fine for me on a clean angular-cli project with webstorm terminal with `ng serve` – penleychan Nov 16 '17 at 16:24
  • 2
    I also use `ng serve` from the PhpStorm terminal on a clean angular-cli project and it works – BeetleJuice Nov 16 '17 at 16:28
  • Are you referring to the debug configurations? – Reactgular Nov 16 '17 at 16:30
  • you guys I meant the green arrow at the top this way the app is one-click-to-run, it runs fine from powershell or the webstorm terminal I just want to upgrade from that and do what I did for my react and vue apps. – tatsu Nov 17 '17 at 08:20

2 Answers2

30

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
lena
  • 90,154
  • 11
  • 145
  • 150
  • 1
    latest webstorm EAP includes clickable run arrows next to each run entry yin the package.json much in the fashion of MAVEN/Gradle – tatsu Mar 01 '18 at 14:10
2

Just open package.json and add the script you want. You can add any script in "script" section. The add your script from the configurations.

takasoft
  • 1,228
  • 15
  • 15