gdb debug with sudo privilege can't pause or set new breakpoint
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- vscode
- 领域
- devtools
调研方向
使用提供的 launch.json 和 .vscode/gdb.sh 通过 Remote SSH 重现该问题,然后将行为与以 root 登录时进行比较。首先跟踪扩展如何与通过 sudo 启动的 GDB 进程通信,重点关注暂停和断点命令。完成的标准是确定原因,并且使用所述 sudo 配置的非 root 用户可以暂停和设置断点,或者将该限制记录下来。
由索引模型根据 Issue 内容生成。
描述
Issue Type: Bug
User logged in has sudo privilege, and been setted NOPASSWD in /etc/sudoers.
The snippet of launch.json is:
"name": "gdb launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/lib/app",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}/lib",
"environment": [],
"externalConsole": false,
"miDebuggerPath": "${workspaceFolder}/.vscode/gdb.sh",
"MIMode": "gdb",
Where gdb.sh is :
#!/bin/bash
sudo gdb "$@"
When debugging through gdb in remote ssh mode, vscode can't pause or set new breakpoint.
But there is no problem while loginning as root.
Environment:
Linux username-VirtualBox 5.4.0-110-generic #124~18.04.1-Ubuntu SMP Fri Apr 22 12:01:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
VSCode and all extensions are the up to date till this issue.
Extension version: 1.11.4
VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No
Remote OS version: Linux x64 5.4.0-110-generic
- 主要语言
- TypeScript
- 星标
- 6.2k
- 派生
- 1.7k
- 平均合并
- 14 小时 46 分钟
- 30 天内合并 PR
- 61
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-cpptools 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries 未关闭bug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 已指派 1 人 ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 条评论 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 64/100
microsoft/vscode-cpptools#14769 ·
-
难度 3/5 1-2 天 新手友好度 68/100
microsoft/vscode-cpptools#14768 · 1 条评论 ·
查看 microsoft/vscode-cpptools 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
0xMiden/bridge-portal#132 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
area:tools bug good first issue help wanted priority:P2
难度 2/5 1-3 小时 新手友好度 90/100
TaewoooPark/Motifcode#14 ·
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
newrelic-experimental/preflight#793 · 1 条评论 ·