This repo contains a sample TypeScript project with a Visual Studio Code launch.json that
allows you run TypeScript code and mocha tests without a seperate build step.
git clone https://github.com/MinionsDave/ts-debug-example
npm install
This repo contains the following VS Code Debug tasks (accessible via the debug button on the left)
-
Debug Current TS Tests File- Allows you to debug the currently openmochaunit tests file (try it withsrc/user.spec.ts) -
Debug by ts-node- Allows you to run and debug the program
These tasks should allow you to hit breakpoints in your code, without needing to compile first.
Further details in a blog post here: https://segmentfault.com/a/1190000010605261