In a previous article, I weighted the pros and cons of writing our unit tests in Typescript (TS) when working on a TS project. In this article, I want to explain how to overcome the challenges of debugging TS unit tests, i.e. hitting a breakpoint in our TS code while executing a test.

The issue here is that TS does not execute per se. Instead, it gets transpiled to JavaScript, which can then run in a browser or Node.js.

The problem statement therefore is: How do we hit a breakpoint in a TS unit test while debugging our code?


Jean Tadebois

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store