microsoft / microsoft/vscode-cpptools

Debugger doesn't launch with lldb (lldb-mi is required)

オープン
#10,491 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

debugger
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

説明

Environment
  • OS and version: Windows 11 12H2
  • VS Code: 1.75.0
  • C/C++ extension: 1.13.9
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version: lldb 15.0.0
Bug Summary and Steps to Reproduce

Bug Summary:
I'm unable to start a debug session with lldb. It always prints an error without doing anything in the terminal or the console.
I tried with both openocd and stm32cubeprogrammer

Debugger Configurations
{
            "name": "Debug main app",
            "type": "cppdbg",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "program": "${workspaceFolder}\\bin\\debug\\main_app.elf",
            "MIMode": "lldb",
            "miDebuggerPath": "C:\\LLVM_Arm_Embedded_Toolchain\\bin\\lldb.exe",
            "miDebuggerServerAddress": "localhost:3333",
            "debugServerPath": "C:\\openocd\\bin\\openocd.exe",
            "debugServerArgs": "-f board/stm32f3discovery.cfg",
            "serverStarted": "Waiting for connection on port .*\\.\\.\\.",
            "stopAtConnect": true,
            // "preLaunchTask": "Build",
            "svdPath": "${command:vscode-embedded.st.svd}/STM32F303.svd"
          },
         {
            "name": "Debug main app",
            "type": "cppdbg",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "program": "${workspaceFolder}\\bin\\debug\\main_app.elf",
            "MIMode": "lldb",
            "miDebuggerPath": "C:\\LLVM_Arm_Embedded_Toolchain\\bin\\lldb.exe",
            "miDebuggerServerAddress": "localhost:3333",
            "debugServerPath": "${command:vscode-embedded.st.gdbserver}",
            "debugServerArgs": "--stm32cubeprogrammer-path ${command:vscode-embedded.st.cubeprogrammer} --swd --port-number 3333",
            "serverStarted": "Waiting for connection on port .*\\.\\.\\.",
            "stopAtConnect": true,
            "logging": { "engineLogging": true, "trace": true, "traceResponse": true },
            // "preLaunchTask": "Build",
            "svdPath": "${command:vscode-embedded.st.svd}/STM32F303.svd"
          }
Debugger Logs
1: (156) ->ST-LINK device initialization OK
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (156) ->Stm32Device, pollAndNotify running...\r\n"},"seq":54}
1: (156) ->Stm32Device, pollAndNotify running...
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (158) ->SwvSrv state change: 0 -> 1\r\n"},"seq":56}
1: (158) ->SwvSrv state change: 0 -> 1
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (158) ->Waiting for connection on port 3334...\r\n"},"seq":58}
1: (158) ->Waiting for connection on port 3334...
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (158) ->Waiting for debugger connection...\r\n"},"seq":60}
1: (158) ->Waiting for debugger connection...
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (158) ->Waiting for connection on port 3333...\r\n"},"seq":62}
1: (158) ->Waiting for connection on port 3333...
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (158) Starting: \"C:\\LLVM_Arm_Embedded_Toolchain\\bin\\lldb.exe\" --interpreter=mi\r\n"},"seq":64}
1: (158) Starting: "C:\LLVM_Arm_Embedded_Toolchain\bin\lldb.exe" --interpreter=mi
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (163) DebuggerPid=70428\r\n"},"seq":66}
1: (163) DebuggerPid=70428
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"[Warning] 1: (200) STDERR: error: unknown option: --interpreter=mi\r\n"},"seq":68}
[Warning] 1: (200) STDERR: error: unknown option: --interpreter=mi
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"[Warning] 1: (201) STDERR: Use 'lldb.exe --help' for a complete list of options.\r\n"},"seq":70}
[Warning] 1: (201) STDERR: Use 'lldb.exe --help' for a complete list of options.
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (204) \"C:\\LLVM_Arm_Embedded_Toolchain\\bin\\lldb.exe\" exited with code 1 (0x1).\r\n"},"seq":72}
1: (204) "C:\LLVM_Arm_Embedded_Toolchain\bin\lldb.exe" exited with code 1 (0x1).
--> E (output): {"type":"event","event":"output","body":{"category":"stderr","output":"Starting: \"C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.0.300.202203231527/tools/bin/ST-Link_gdbserver.exe\" --stm32cubeprogrammer-path C:/ST/STM32CubeIDE_1.10.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.301.202207041506/tools/bin/ --swd --port-number 3333\r\nStarting: \"C:\\LLVM_Arm_Embedded_Toolchain\\bin\\lldb.exe\" --interpreter=mi\r\nerror: unknown option: --interpreter=mi\r\nUse 'lldb.exe --help' for a complete list of options.\r\n\"C:\\LLVM_Arm_Embedded_Toolchain\\bin\\lldb.exe\" exited with code 1 (0x1).\r\n\r\n"},"seq":74}
Other Extensions

No response

Additional Information

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された cppdbg 構成で示されるデバッガーの起動経路から始め、特に MIMode と miDebuggerPath がどのように使用されているかを確認します。ログに記録された構成で起動を再現し、選択された LLDB 実行可能ファイルが MI 起動引数を受け付けることを確認してください。不明なオプションのエラーなしにデバッグ セッションが起動すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, vscode
領域
devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。