By default (and hopefully it's not the only option) when I have a ts file, Chrome only lets me debug the ts code. I.e it does show me the content of both the ts and js files, but when I try to put a break-point in the js file, it immediately transfers me to the ts file and locates the break-point in the right place.
How can I tell Chrome to debug the js file rather than the ts one?
To view any variable in chrome, go to "Sources", and then "Watch" and add it. If you add the "window" variable here then you can expand it and explore.
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With