Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to config WebStorm to run JS files?

Tags:

javascript

I want to config WebStorm idle such that it can execute JS files just like Python idle which runs codes. There is already a predefined Node.js configuration which seems to work but in fact it doesn't. When I run JS files under the configuration, nothing is shown to the out put.

Here is how my situation seems :

enter image description here

Code running seems to work but nothing is shown. I'm running Windows 7 64-bit. What is the problem and how to fix it?

like image 859
The_Diver Avatar asked May 29 '16 14:05

The_Diver


People also ask

How do I add a configuration to WebStorm?

Add Run/Debug configurations to the Services windowSelect View | Tool Windows | Services from the main menu or press Alt+8 . In the Services tool window, click Add service, then select Run Configuration Type. Select a run/debug configuration type from the list to add all configurations of this type to the window.

How do I test JavaScript code in WebStorm?

Navigation WebStorm lets you quickly jump from the source code to the related test file with the Go to test action ( Ctrl+Shift+T or Navigate | Test). For example, from auth. js you can jump to auth. test.


1 Answers

https://nodejs.org/en/#download

dowload node Interpreter. Click right button on your code field, choose Run 'gg.js', in field Node Interpreter enter path to node.exe file, the press Ok

More info: https://www.jetbrains.com/help/webstorm/2016.1/run-debug-configuration-node-js.html

like image 165
Mikhail Petrov Avatar answered Sep 28 '22 05:09

Mikhail Petrov