小编DiX*_*uli的帖子

使用 ROS 设置 VScode 并自动完成

我正在努力使用 ROS 配置 VSCode 以具有自动完成功能。我习惯于在 Qt 和 OpenCV 中使用 VSCode,一切正常。例如,对于 OpenCV,我只是这样编辑c_cpp_propreties.json

{
"configurations": [
    {
        "name": "Linux",
        "includePath": [
            "${workspaceFolder}/**",
            "/usr/local/include/opencv4/opencv2"
        ],
        "defines": [],
        "compilerPath": "/usr/bin/gcc",
        "cStandard": "gnu11",
        "cppStandard": "gnu++14",
        "intelliSenseMode": "clang-x64"
    }
],
"version": 4
Run Code Online (Sandbox Code Playgroud)

}

OpenCV 的自动完成工作正常(我有C++ IntelliSense 扩展)。但后来,当我试图指定include从ROS在文件夹中c_cpp_propreties.json,没有什么作品了,甚至没有OpenCV的自动完成:

{
"configurations": [
    {
        "name": "Linux",
        "includePath": [
            "${workspaceFolder}/**",
            "/usr/local/include/opencv4/opencv2",
            "/opt/ros/melodic/include"
        ],
        "defines": [],
        "compilerPath": "/usr/bin/gcc",
        "cStandard": "gnu11",
        "cppStandard": "gnu++14",
        "intelliSenseMode": "clang-x64"
    }
],
"version": 4
Run Code Online (Sandbox Code Playgroud)

}

就像 ROS 正在阻止一切。我究竟做错了什么?我指定在 VSCode …

c++ intellisense autocomplete ros visual-studio-code

14
推荐指数
2
解决办法
2944
查看次数

VScode 无法设置通过 VPN 动态端口转发到远程端口的套接字

当我直接连接到我工作的公司的网络时,我可以通过 VScode 和 Remote-SSH 访问我的服务器,没有任何问题,并且无需任何特殊配置。但是,当我通过 VPN 在家工作时,我无法让它工作。

我仅使用控制台通过 VPN 连接到 ssh 时遇到问题,但我按照这篇文章中所述修复了它。

但尝试在 VScode 中设置相同的配置并没有解决我的问题:

Host Server1
  HostName ip_adress
  HostKeyAlgorithms +ssh-rsa
  PubkeyAcceptedKeyTypes +ssh-rsa
  User user
Run Code Online (Sandbox Code Playgroud)

我尝试删除/.vscode-server并允许/etc/ssh/sshd_conf中的端口转发,但它没有改变任何内容。这是输出:

[14:22:58.514] Log Level: 2
[14:22:58.515] remote-ssh@0.84.0
[14:22:58.515] win32 x64
[14:22:58.523] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a225254525432227d", attempt 1
[14:22:58.523] "remote.SSH.useLocalServer": false
[14:22:58.523] "remote.SSH.showLoginTerminal": false
[14:22:58.523] "remote.SSH.remotePlatform": {"10.61.46.222":"linux","10.61.44.114":"linux","TRT2":"linux","TRT1":"linux","smartag":"linux"}
[14:22:58.524] "remote.SSH.path": undefined
[14:22:58.524] "remote.SSH.configFile": undefined
[14:22:58.524] "remote.SSH.useFlock": true
[14:22:58.524] "remote.SSH.lockfilesInTmp": false
[14:22:58.524] "remote.SSH.localServerDownload": auto
[14:22:58.524] "remote.SSH.remoteServerListenOnSocket": false
[14:22:58.524] "remote.SSH.showLoginTerminal": false
[14:22:58.524] "remote.SSH.defaultExtensions": …
Run Code Online (Sandbox Code Playgroud)

ssh vpn server visual-studio-code

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

标签 统计

visual-studio-code ×2

autocomplete ×1

c++ ×1

intellisense ×1

ros ×1

server ×1

ssh ×1

vpn ×1