skip to Main Content

I would like to run and debug a simple (plain) Javascript I created over the Ctrl + Shift + Alt + Insert shortcut in my IntelliJ Idea Ultimate.

I’d like to prevent to have to implement any boilerplate like a HTML file or npm project.

What is the easiest way to do it? Am I just overlooking any obvious feature?

I searched for a run feature similar to the Java launch configuration and tried it over a plain node project using npm init --yes and npm run in the same folder, but to no avail.

2

Answers


  1. If you have node installed locally you can simple run node example.js
    and it should output into the terminal.

    Login or Signup to reply.
  2. Normally all you need is right-clicking your JavaScript scratch file and choosing Run:

    enter image description here

    But you have to make sure that Node.js plugin is enabled in IDEA, and the local Node.js interpreter is installed and configured in Settings | Languages & Frameworks | Node.js

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search