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?
- Go to Tools | External Tools | Customize Tools…. Click New.
- In the External Tool Properties dialog, Add
C:\Windows\System32\cmd.exeto the Command field. - Add
/k ""program path" "$(Path)""to the Arguments field and replaceprogram pathwith the program’s executable file path.- The
/kargument keeps the Command Prompt window open as written here.
- The
- Optionally, find a suitable icon for Icon Path.
- Click OK. The command is available in the Tools toolbar.
The below screenshot shows an example for Node.
