Repository navigation
Replies: 1 comment
|
For a CommonJS ts-node setup, start Node with the inspector and preload ts-node's require hook: node --inspect-brk -r ts-node/register script.tsThe Node flag belongs before the script. I tested that command's inspector setup with ts-node 10.9.2 / TypeScript 5.9.3 and Node 24.19.0: attached to the real inspector, resumed the startup pause, paused at |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
I was trying to debug a script recently but I couldn't find out how to attach the debugger to pause execution and inspect a few values.
Considering the Node script below, I would typically run
node inspect script.jsand it would open the debugger:Is there a way to do the same with
ts-node?The debugger in Node looks like this:
Any advice on how to get this working would be much appreciated. 🙏
All reactions