A quick tip on debugging ts-node in WebStorm

Use ts-node to run typescript NodeJS project

ts-node saves time to build ts project to js and use node xxx.js to run, it compiles the ts files on the fly but unfortunately, WebStorm does not have an option to debug it

Easiest solution I have found

Edit the default config, add this in node params

--inspect --require ts-node/register

The result looks like this, now you can set breakpoints and start debugging your code!
WX20180629-173707@2x

Easy enough?

mimimi

mimimi

Currently a Computer Engineering student at the National University of Singapore, passionate about software engineering. Contact me: info at mimimi.fun

Read More
A quick tip on debugging ts-node in WebStorm
Share this