2

I'm trying to enable debug mode in my angular project using Intellij, so after start my project (npm start) i created a JavaScript Debug Configuration:

enter image description here

Debuggin in Google Chrome the breakpoint get exactly in place as i expected (my typescript file), but in Intellij IDEA the breakpoint get in a totally different place, look in Intellij: enter image description here

I already installed the JetBrains plugin for Google Chrome and check if sourceMap is enabled in my tsconfig.json but the problem persist:

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
      "sourceMap": true,
...

I tried to solve my problem with this post how to run angular application in IntelliJ but didn't work, the problem continue. Note that in this post the subject is about run angular project, i'm already running my project very well, i just want to debug it correctly.

Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92

1 Answers1

0

The two important things that you need to do in your Javascript D are:

  1. Set the Remote URL for your root folder: webpack:///.
  2. Set the Remote URL for your src folder: webpack:///.src/

https://itnext.io/debugging-your-angular-application-in-intellij-idea-411a9b08759f

Halil
  • 1,795
  • 1
  • 24
  • 39