I have a C#.NET Core Web application that uses some C++ code for certain operations. This web application is running on Cent OS 8. (I am a Windows Developer and working on Linux for first time and so with VSCode)
I only have the option to debug using VSCode in CentOS. I am familiar with VS2019 Mixed mode debugging but I am not able to find that option in VSCode. Does it not support it? Launch.Json doesn't allow "profiles" to add to it, which was allowed in VisualStudio2019 which enabled the mixed mode debugging.
One work around I tried was making a Launch.json setting for gdb:
"configurations": [
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/CSharpCodeBinary/ManagedCode.dll",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
Once I run the ManagedCode.dll on a terminal, I attach to "dotnet" application hoping to get a breakpoint hit in the unmanaged cpp file (that generates UnmanagedCode.so).
The "ManagedCode.dll" is the C# NetCore assembly which loads the native "UnmanagedCode.so" for accessing unmanaged code. I have built "UnmanagedCode.so" using g++ -Og switch to generate symbols.
Still I am getting no luck to hit the breakpoint.
I just want to somehow hit the breakpoint inside UnmanagedCode.so code. Any way is acceptable.