Telling Chrome to debug js rather than ts Telling Chrome to debug js rather than ts google-chrome google-chrome

Telling Chrome to debug js rather than ts


Since you don't have control over the TS compilation settings, you can disable JavaScript source maps all together in Chrome.

Load the developer tools (Chrome Menu > More Tools > Developer Tools), then load the developer tool settings (Developer Tools Menu > Settings), find the setting for "Enable JavaScript source maps" and disable it.


If you are in development mode, you should have source mapping between the TypeScript and the transpiled JavaScript. For debugging, you would put breakpoints on the TypeScript code in DevTools, as that is the code you wrote it in. It makes sense to debug the code you wrote.

If you want to debug only the JavaScript, run the application in the deployed mode (no source map), and set the breakpoint on the resulting JavaScript code.


I assume you are using tsc to compile.

If so, there is a simple parameter that will tell tsc to not create source maps and hence not include the # sourceMappingURL=... directive:

tsc --sourceMap false