Max Koretskyi
Max Koretskyi

Reputation: 105547

How to disable `ts` sources maps debugging

I'm trying to debug TS project. WebStorm automatically picks up source maps and show original ts files. I don't want to use source maps and debug generated js files. How can I disable usage of source maps in WebStorm?

NOTE: this question is not about how to disable source maps generation, it's about how to disable source maps usage during debugging

Upvotes: 15

Views: 10798

Answers (1)

thitemple
thitemple

Reputation: 6059

One option is to check if there's a tsconfig.json file and in it, you can disable the sourceMap generation:

{
  "compilerOptions": {
    "sourceMap": false
  }
}

Another option, is to disable the use of source map files in your browser's debugger, for instance in Chrome you can uncheck this option:

enter image description here

Under Settings -> Preferences

Upvotes: 11

Related Questions