There are dedicated extensions available for each programming language for VS Code but this one here this covers almost all of them under one umbrella. Here it works with the simple keyboard shortcut and right click menu. It automatically identifies the current programming language being worked on and it loads be run and build commands accordingly.
Run any Programming Code in VS Code in a Click: Code Runner
Install this extension from VS Code Marketplace here. After that, it will add the run option in VS Code. You can either install it directly from the marketplace or download the extension file to install it manually.
After successful installation, it will add the Run Code option in the right click menu of the editor. Or, you can simply use Alt+ CTRL+N keyboard shortcut to the do the same. It will run the current file in the terminal automatically. Also, it will identify how to run the code by itself.
This is it. This is how this simple extension works to help you run code right inside VS Code. You only have to use the simple shortcut. It already supports a lot of languages so it doesn’t really matter how you program in VS Code.
If you are a VS Code user then you will really like this simple and powerful VS Code extension. What I liked best about it is the number of languages that it supports. Also, I liked its ability to identify the language and use the run command accordingly.