Debugging C# on OSX with Visual Studio Code
当我尝试调试样例C#脚本时,Visual Studio Code报告了以下错误:因此,我无法检查脚本中定义的变量。Could not find the preLaunch task 'build'
这是一个launch.json文件的副本:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch console application",
"type": "mono",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/Program.exe",
"args": [],
"cwd": "${workspaceRoot}",
"stopAtEntry": false
}
]
}
这是一个 tasks.json 文件的副本:
{
"version": "0.1.0",
"command": "mcs",
"args": [
"-debug",
"Program.cs"
],
"showOutput": "silent",
"taskSelector": "/t:",
"tasks": [
{
"taskName": "exe",
"isBuildCommand": true,
"problemMatcher": "$msCompile"
}
]
}
我该如何解决这个问题?