Struggling to develop a CLI tool using TypeScript within WebStorm as my IDE. No matter what I try, debugging just won't work for me. My journey in Node.js CLI programming started with this tutorial. Successfully transpiling the TS source with npx tsc
, running the resulting JS file through CLI, and even executing it from a Run Configuration in WebStorm - all possible. However, the issue arises when attempting to debug. Setting breakpoints and running it under Debug configuration or using the --inspect-brk
option alongside an "Attach to Node.js/Chrome" configuration yields no successful results despite getting a "Debugger attached." message. The breakpoints in the IDE never get triggered. What could be missing?