Install netcoredbg and after that the dotnet-sdk
https://github.com/Samsung/netcoredbg
Arch linux:
https://aur.archlinux.org/packages/netcoredbg
# i use picaur, but choose one of: pacaur, pikaur, yay, aura, paru, aurman, ..? picaur -S netcoredbg sudo pacman -S dotnet-sdk-8.0
Install the vscode extension
https://open-vsx.org/extension/blipk/csharp
Download the vsix file from the latest release assets.
Open the command pallete (Ctrl+Shift+P) then run Extensions: Install from VSIX
After installation open your workspace/solution/project
Add: /.vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "/usr/bin/dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}Add: /.vscode/launch.json (Replace ‘MyProject’ with your project name)
{
"version": "0.2.0",
"configurations": [
{
"name": "netcoredbg",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/MyProject/bin/Debug/net8.0/MyProject.dll",
"args": [],
"cwd": "${workspaceFolder}",
"env": {
"DOTNET_ENVIRONMENT": "Development"
}
}
]
}Add global.json to ensure it finds the SDK version
{
"sdk": {
"rollForward": "latestMajor",
"version": "8.0.0"
}
}981900cookie-checkDotNet debug on linux