It’s possible to use the WebStorm editor to debug grunt tasks if you are using TypeScript and generating .map files. Assuming that grunt is already launching from the command line, here’s how to step into the debugger:
- Open your project’s folder in WebStorm.
- Click Run… Edit Configurations…
- Add a new configuration for Node.js (the green + sign)
- Name it “Debug Grunt”
- Set the application parameters to the grunt task you wish to debug, for example dev or just leave blank if it is default.
Thanks to Diego and everyone else who answered this question on Stack Overflow.