Navigate this page
hide
EXE stands for executable. An EXE file is an executable program you can run in Microsoft Windows. If you want to debug an executable (.exe file) directly, you may need to open it in the editor. This article will show how to open .exe files in Visual Studio Code. You’ll also learn to run the .exe file in the VS Code terminal.
Opening EXE files in VS Code
To open an EXE file for an existing project, do the following:
- In VS Code, select the Open File option from the “File” menu. Alternatively, press Ctrl + O in Windows/Linux or Cmd + O in Mac OS
From the top-level File menu, select the Open File option. - In the “Open File” dialogue box, navigate to your .exe file, select it, and click on the Open button
Open the .exe file from your preferred directory. - When prompted with the following error, select the Open Anyway button.
Click on the Open Anyway button. - A palette will open in the center of the VS Code to choose the editor. Choose the Text Editor option. It will open the .exe file in text format.
Choose Text Editor as the editor.
Running EXE files in VS Code
To run an EXE file inside VS Code, do the following:
- Open the Extensions view or press Ctrl + Shift + X in Windows or Shift + Cmd + X in Mac OS. Inside the search bar, type “exe runner”.
Go to the Extensions view and search for “exe runner”. - Select the extension and click on Install.
Click on the Install button. - Right-click inside the code editor and select the Run Executable. Alternatively, you can press the Run Executable button on the top-right corner. It will run the .exe file in the VS Code terminal.
Right-click and choose the Run Executable option.