Cursor无法使用C/C++调试的解决办法

背景

这几天在二开ffmpeg,发现用cursor无法使用cppdbg进行调试,只能上机gdb,比较麻烦。

配置文件

json 复制代码
// launch.json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "gdb Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/ffmpeg",
            "args": [
                "-i", "/root/test.mp4",
                "-vf", "scale=1280:720",
                "-psnr",
                "-c:v", "libx264",
                "-f", "flv",
                "-y", "/dev/null"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

过程

点了一下debug按钮,闪一下就没了,日志也查不到为什么。一开始以为是什么东西没装,折腾了半天在vscode用同样的launch.json可以正常调试。然后结合最近微软不让第三方使用c/c++插件的事情怀疑就是插件版本的问题。

我cursor上安装的c/c++版本是最新能够被第三方使用的1.23.6,vscode居然还是老版本:1.22.10

解决办法

直接在cursor上回退c/c++的插件到1.22.10就OK了:

相关推荐
2401_892070982 天前
【Linux C++ 日志系统实战】LogFile 日志文件管理核心:滚动策略、线程安全与方法全解析
linux·c++·日志系统·日志滚动
yuzhuanhei2 天前
Visual Studio 配置C++opencv
c++·学习·visual studio
Wenweno0o2 天前
0基础Go语言Eino框架智能体实战-chatModel
开发语言·后端·golang
chenjingming6662 天前
jmeter线程组设置以及串行和并行设置
java·开发语言·jmeter
qq_339554822 天前
英飞凌ModusToolbox环境搭建
c语言·eclipse
cch89182 天前
Python主流框架全解析
开发语言·python
不爱吃炸鸡柳2 天前
C++ STL list 超详细解析:从接口使用到模拟实现
开发语言·c++·list
十五年专注C++开发2 天前
RTTR: 一款MIT 协议开源的 C++ 运行时反射库
开发语言·c++·反射
Momentary_SixthSense2 天前
设计模式之工厂模式
java·开发语言·设计模式
‎ദ്ദിᵔ.˛.ᵔ₎2 天前
STL 栈 队列
开发语言·c++