小编The*_*rew的帖子

通过 docker 在 VS Code 中混合调试(C#、C++)

我们最近将开发从 Visual Studio 转移到 VS Code。我们的代码解决方案包含 .NET Core C#,它将计算交给 C++。在 Visual Studio 中,我们能够在 C# 和 C++ 之间无缝调试。

我们最初转而在虚拟机中运行多项目解决方案并使用VS Code 的远程开发功能。我们使用两种启动配置:

{
            "name": "(gdb) Attach",
            "type": "cppdbg",
            "request": "attach",
            "program": "/usr/share/dotnet/dotnet",
            "processId": "${command:pickProcess}",
            "additionalSOLibSearchPath": "${workspaceFolder}/src/build/Debug/Cpp/",
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        },
        {
            "name": "Run C#",
            "type": "coreclr",
            "request": "launch",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/src/AppProject/bin/Debug/netcoreapp2.2/AppProject.dll",
            "args": [],
            "cwd": …
Run Code Online (Sandbox Code Playgroud)

debugging docker visual-studio-code

5
推荐指数
0
解决办法
747
查看次数

标签 统计

debugging ×1

docker ×1

visual-studio-code ×1