I could do the publish+start+attach only from VSCode. However, it's not such a big pain, normal coding can be done in VS. VSCode is open next to it and if I need to debug on RPI, I switch to VScode and start the debug session.
This is my launch.json config in VSCode:
{
"name": "RPI 192.168.0.xx",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "publish", <--- this contains the pscp copy part
"program": "~/.dotnet/dotnet",
"args": [
"/testapp/app.dll"
],
"cwd": "/testapp/",
"stopAtEntry": true,
"console": "internalConsole",
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "c:\\Program Files\\PuTTY\\plink.exe",
"pipeArgs": [
"-pw",
"<your_password>", <--- for local tests ok
"[email protected]"
],
"debuggerPath": "~/vsdbg/vsdbg"
}