//add 'program' and the name of your dart file to launch.json, then hit f5
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart",
"program": "lib/your_class/file_name_with_main_function.dart"
}
]
if you have the flutter plugin just press shift + command/contrl + D and then run and debug
main. dart file will show up.
Hit Ctrl + F5 to run or Run, Run without debugging.
In the Debug Console window, you will see the result.
or
flutter run in the terminal