VScode 右键没有转到定义等的菜单

问题:

右键点击该函数出现的结果只能是这样的:

VScode 右键没有转到定义等的菜单_第1张图片

解决:

通过修改 settings.json 文件,以解决问题:

这是原来有问题的配置:

{
    "python.autoComplete.extraPaths": [
        "/home/robot/1-temp_make/devel/lib/python2.7/dist-packages",
        "/opt/ros/melodic/lib/python2.7/dist-packages"
    ],
    "python.analysis.extraPaths": [
        "/home/robot/1-temp_make/devel/lib/python2.7/dist-packages",
        "/opt/ros/melodic/lib/python2.7/dist-packages"
    ]
}

主要添加

"C_Cpp.intelliSenseEngine":"default"

就可以解决

最终的配置:

{
    "python.autoComplete.extraPaths": [
        "/home/robot/1-temp_make/devel/lib/python2.7/dist-packages",
        "/opt/ros/melodic/lib/python2.7/dist-packages"
    ],
    "python.analysis.extraPaths": [
        "/home/robot/1-temp_make/devel/lib/python2.7/dist-packages",
        "/opt/ros/melodic/lib/python2.7/dist-packages"
    ],
    "C_Cpp.intelliSenseEngine":"default"
}

"C_Cpp.intelliSenseEngine":"default"的值有三个,我们根据提示选择 default,就可以出现转到定义。

你可能感兴趣的:(嵌入式/嵌入式Linux,vscode,ide,编辑器)