Compiling codes every time you want to run a program is time-consuming. This is where the Visual Studio Code extension Code Runner helps. It enables you to run a variety of languages in Visual Studio Code. This guide will show how to easily see the output in Visual Studio Code with just one click.
Install Code Runner
Follow the below steps to install the Code Runner extension in VS Code:
- From the sidebar, click on the Extensions tab.
- In the search bar, type “Code Runner.”
- Click on Install.
See the output of your code
To see the output of any program, we use Code Runner. Follow these steps:
- Open the program you want to run. Here, I have opened a PHP program.
- Click on the Run button on the top-right corner of the VS Code. Alternatively, you can press Ctrl + Alt + N (Command + Option + N for Mac users).
- You’ll notice the output in the terminal.