4 ms·
You're doing something wrong. You should be able to debug using source maps. If you're doing front-end code this should just work in Chrome, you should see you
by mattmanser 4y ago
You're doing something wrong. You should be able to debug using source maps.
If you're doing front-end code this should just work in Chrome, you should see your typescript code. There's an extra node in the sources tree view that'll beall the mapped code instead of the minified stuff. There's a few quirks in setting breakpoints in that sometimes it won't let you set one on a particular line, but otherwise you can step through code.
Check your compiled output for .map files and that you're serving them to the browser.
https://developer.chrome.com/docs/devtools/javascript/source-maps/ https://developer.chrome.com/docs/devtools/javascript/source...
You actually have to turn it off for it not work out-the-box.
Looks.like.it should work fine in Node as well:
https://nodejs.medium.com/source-maps-in-node-js-482872b56116 https://nodejs.medium.com/source-maps-in-node-js-482872b5611...
Check your minified file has something like this at the end:
//# sourceMappingURL=test.js.map
If it doesn't, you've might not have the include source map option turned off on your transpiler/minifier.
Note that it's often turned off by default for production builds, for obvious reasons.