MikeO
MikeO

Reputation: 205

How to view / debug Javascript when using Typescript

Visual Studio 2017 does a great job of letting me debug directly in TypeScript and a lot of the time this is extremely helpful. That said, there are times when I REALLY need to debug the underlying Javascript and I can't see how to do it. Is there a way to tell Visual Studio to let me debug in Javascript?

Between the problem with "this" really being "_this" and screwing up the debugger and async / away functions generating very different underlying code it becomes critical to be able to access the Javascript to debug.

Upvotes: 1

Views: 108

Answers (1)

basarat
basarat

Reputation: 275857

it becomes critical to be able to access the Javascript to debug.

Disable sourcemaps.

  • In your debugger e.g. chrome options
  • In your tsconfig sourceMap: false
  • In your webpack config devtool : 'none'
  • Anywhere else you might have configured it

Upvotes: 2

Related Questions