17
Per configurare codice Visual Studio per eseguire il debug C# script su OSX, ho seguito tutti i passaggi elencati in questo articolo qui sotto:Impossibile trovare il compito 'costruire' prelancio
Debugging C# on OSX with Visual Studio Code
Quando ho provato a eseguire il debug il # script di esempio C, codice Visual Studio ha segnalato questo errore:
Could not find the preLaunch task 'build'
di conseguenza, non ho potuto ispezionare le variabili definite nello script.
Questa è una copia del file dilaunch.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
}
]
}
Questa è una copia del file ditasks.json:
{
"version": "0.1.0",
"command": "mcs",
"args": [
"-debug",
"Program.cs"
],
"showOutput": "silent",
"taskSelector": "/t:",
"tasks": [
{
"taskName": "exe",
"isBuildCommand": true,
"problemMatcher": "$msCompile"
}
]
}
Come risolvo questo?