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了:

相关推荐
C^h16 小时前
c++ string
开发语言·c++
听风说ml16 小时前
socket编程 【C语言】
c语言·udp·tcp·socket编程
raindayinrain16 小时前
c++高性能--原子操作,无锁编程,操作顺序
开发语言·c++·性能优化
学逆向的16 小时前
C++ 合并命名空间
开发语言·c++·网络安全
Zhao-Jichao17 小时前
VS2026 打包 C++ 程序生成 EXE,借助 Installer Project 扩展工具
开发语言·c++
学逆向的17 小时前
C 局部静态变量
c语言·开发语言·网络安全
小徐不徐说18 小时前
C++ 接口与插件设计:从工厂注册到 Qt 动态插件
数据库·c++·qt·系统架构·程序设计
大都督会赢的18 小时前
C++第一节课
开发语言·c++
UIU11418 小时前
P1233 [ICPC 2001 Taejon R] 木棍加工
数据结构·c++·算法·动态规划
“AI国潮设计-小江”18 小时前
【AIGC实战】Python+Stable Diffusion打造“英歌舞财神”IP,解锁“马到成功”等爆款情绪营销文案设计
开发语言·人工智能·python·prompt·aigc