To configure Visual Studio Code to debug C# scripts on OSX, I followed through all the steps listed in the article below:
Debugging C# on OSX with Visual Studio Cod
The error occurs because Visual Studio Code cannot find any task in the tasks.json with the taskName
value set to 'build'
.
The preLaunchTask
property of the launch.json file defines the task that should be executed before the script is launched. From the question, Visual Studio Code has been configured to run the task build
before launching the script:
preLaunchTask: 'build'
But there's no task named 'build'
in the tasks.json file.
To fix this, you should change the value of the preLaunchTask
property to 'exe'
, which is the build task that has been defined in the tasks.json file.