Run your first Dart example in Visual Studio Code

View more Tutorials:

1- Article objective

In this article I'm going to show you how to create a simple Dart example on Visual Studio Code and run it successfully. First and foremost, make sure that you have already installed the​​​​​​​ Dart Code Extension in Visual Studio Code, otherwise you can refer to the following article:
Note that apart from Visual Studio Code, there are a lot of IDE(s) in support of Dart programming, such as Android Studio, IntelliJ IDEA, etc. Thus, the following articles may be useful for you:

2- The first Dart example with VS Code

After installing Dart Code Extension in Visual Studio Code, we will create an example of Dart and make sure that it runs perfectly on Visual Studio Code.
Firstly, create any folder, MyFirstDartProject, for example. Then open it with Visual Studio Code.
  • File > Open Folder
Next, add a new file named "MyFirstDart.dart":
main() {
  print("Hello World!");
Now run the example:
After you press "Run and Debug", the launch.json file will be created. It contains the configuration to specify the files used to run the application.
  • Run > Run Without Debugging
  • View > Debug Console

View more Tutorials: