How to See the Output in Visual Studio Code

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:

  1. From the sidebar, click on the Extensions tab.

    Extensions Tab
    Open the Extensions tab from the sidebar.

  2. In the search bar, type “Code Runner.”

    Search Code Runner
    Search for Code Runner.

  3. Click on Install.

    Install Code Runner
    Click on the Install button.

See the output of your code

To see the output of any program, we use Code Runner. Follow these steps:

  1. Open the program you want to run. Here, I have opened a PHP program.

    This is a sample PHP code that prints Hello World.

  2. 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).

    Click on the Run button.

  3. You’ll notice the output in the terminal.

    This is the output.

Leave a Comment