Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run/debug files with babel-node in WebStorm?

I know there are Run/Debug configurations in WebStorm, but I don't know how to configure the context menu (when I right click in a file, it has Run... and Debug... in the menu, but I can't find where to configure this).

like image 515
Otto Avatar asked Oct 23 '25 13:10

Otto


1 Answers

Run configurations are created via Run | Edit Configurations... : press +, choose Node.js, in created configuration specify babel-node as Node Interpreter:

enter image description here

But note that debugging doesn't work well when using it. I'd strongly recommend using -r @babel/register Node.js parameter instead - see comments in https://youtrack.jetbrains.com/issue/WEB-21949

like image 155
lena Avatar answered Oct 27 '25 04:10

lena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!