I posted the method at https://github.com/microsoft/MIEngine/issues/1105 but here is the just of it:
For anyone else who is interested here is what I did:
1. Follow the overall instructions at https://github.com/microsoft/MIEngine/w ... ual-Studio to set things up (ssh etc).
2. Since Wine runs the WPF app, vsdbg also needs to run within Wine. To get that I installed VS Code on Windows, installed the extension "C# for Visual Studio Code (powered by OmniSharp)", and copied "%USERPROFILE%.vscode\extensions\ms-dotnettools.csharp-1.23.9.debugger" to "~/vs-debugger"
3. Change launch.json like this so vsdbg runs under Wine as well:
Code: Select all
{
"version": "0.2.0",
"adapter": "C:\...bin\PLINK.EXE",
"adapterArgs": "-i C:\...\ssh-ubuntu.ppk [email protected] -batch -T wine ~/.vs-debugger/vsdbg.exe",
"configurations": [
{
"name": ".NET Core Ubuntu Wine Launch",
"type": "coreclr",
//"request": "launch",
//"cwd": "/usr/bin/wine",
//"program": "/home/user/debug/xyz.dll",
"request": "attach",
// replace with the process id you want to attach to. You can find this by running 'pidof' in the container
// ex: `docker exec -it my_container_name pidof dotnet`
// For Wine, use Wine TaskManager to get the PID of your WPF app (not the unix pid).
"processId": 204
}
]
}
Happy debugging!