3

I have been trying to debug a Hello World Angular CLI application with IntelliJ 2018, but I am running in some difficulties and cannot find a solution for it. Initially when I ran the option ng start from IntelliJ to Debug, ot returned that it needed the %NODE_DEBUG_OPTION% in the pacjage.json file, so I made this change:

"scripts": {     
    "start": "ng %NODE_DEBUG_OPTION% serve",
}

And ran the Debug again, but now it returns the error Unknown option: '--inspect-brk' and still have not found a solution for it. What exactly I am missing with this configuration?

Thank you.

Joe Almore
  • 4,036
  • 9
  • 52
  • 77

1 Answers1

3

Perhaps this will work for you

"start": "node %NODE_DEBUG_OPTION% ./node_modules/@angular/cli/bin/ng serve"
yurzui
  • 205,937
  • 32
  • 433
  • 399
  • Hello @yurzui, thank you for your response. I applied your suggestion and now it says `Debugger listening on ws://127.0.0.1:41132/9859a066-b570-4515-814b-46edc791a8d9`, what exactly is that address for? and how do I place breakpoints in the `Typescript` code on `Intellij`? The breakpoints are not being hit. – Joe Almore Nov 14 '18 at 15:19
  • 1
    @JoeAlmore please follow this -> https://www.jetbrains.com/help/idea/configuring-javascript-debugger.html – Dharan Ganesan Nov 20 '18 at 09:10