Otto
Otto

Reputation: 1685

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).

Upvotes: 4

Views: 3519

Answers (1)

lena
lena

Reputation: 93858

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

Upvotes: 9

Related Questions