microsoft / microsoft/vscode-cpptools
macOS Sierra cannot debug c++ above vscode-cpptools 1.5.1 version
オープン
まだ誰も着手していません。
debugger
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
Environment
- OS and version: macOS Sierra(10.12.6)
- VS Code: 1.67.0
- C/C++ extension: 1.6.0~1.10.0
- Xcode version: 9.2 (9C40b)
- GDB / LLDB version:
/usr/local/bin/gdb version11.2
/usr/bin/lldb --versionlldb-900.0.64
Bug Summary and Steps to Reproduce
Bug Summary:
I use C/C++ extension 1.10.0 debug single C++ file with launch.json:
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/main",
"args": [],
"stopAtEntry": true,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"miDebuggerPath": "/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi",
"logging": {
"trace": true,
"engineLogging": true,
"traceResponse": true,
}
}
]
}
but it does not work.
I set
"MIMode": "gdb",
"miDebuggerPath": "/usr/local/bin/gdb"
still not work, the gdb installed by brew, version 11.2.
I reverse the cpptools version to 1.51 work well.
another related discussion
so, I think against lldb there is a problem with the debugAdapters version released for MacOS High Sierra and lower.
Debugger Configurations
tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang++ 生成活动文件",
"command": "/usr/bin/clang++",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}
launch.json
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/main",
"args": [],
"stopAtEntry": true,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"miDebuggerPath": "/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi",
"logging": {
"trace": true,
"engineLogging": true,
"traceResponse": true,
}
}
]
}
### Debugger Logs
```shell
`Debug Console` output nothing.
`Output windows` tab `C/C++` output:
启动配置:
{
"name": "(lldb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "/Users/witton/demo/main",
"args": [],
"stopAtEntry": true,
"cwd": ".",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"miDebuggerPath": "/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi",
"logging": {
"trace": true,
"engineLogging": true,
"traceResponse": true
},
"__configurationTarget": 5
}
### Other Extensions
_No response_
### Additional Information
_No response_
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提示された tasks.json と launch.json を使い、一覧に記載された C/C++ 拡張機能、LLDB、GDB のバージョンで macOS Sierra 上の障害を再現します。拡張機能のバージョン 1.5.1 と動作を比較し、C/C++ の出力とデバッガーのログを調べます。影響を受ける構成で、新しい拡張機能を使用して単一ファイルの C++ デバッグが動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100