I want to compile the opened file with an external tool in Command Prompt. How do I keep the Command Prompt window from closing after the compilation is finished?

  1. Go to Tools | External Tools | Customize Tools…. Click New.
  2. In the External Tool Properties dialog, Add C:\Windows\System32\cmd.exe to the Command field.
  3. Add /k ""program path" "$(Path)"" to the Arguments field and replace program path with the program’s executable file path.
    • The /k argument keeps the Command Prompt window open as written here.
  4. Optionally, find a suitable icon for Icon Path.
  5. Click OK. The command is available in the Tools toolbar.

The below screenshot shows an example for Node.

External Tool Properties