microsoft / microsoft/vscode-cpptools

"miDebuggerPath" completely ignored when "debugServerPath" is used

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

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

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

説明

Describe the bug

  • OS and Version: Windows/Linux (Version does not matter)
  • VS Code Version: Does not matter.
  • C/C++ Extension Version: UPSTREAM (0.21.0)
  • Other extensions you installed (and if the issue persists after disabling them): Does not have any influence.
  • A clear and concise description of what the bug is:

When you specify a debugServerPath and a debugServerArgs, miDebuggerPath and miDebuggerArgs are completely ignored. Furthermore you HAVE to specify a miDebuggerServerAddress even tho that is not necessarily required as you can specify this via miDebuggerArgs

To Reproduce
Please include a code sample and launch.json configuration.
See the launch.jsonbelow:

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "COM Example",
        "type": "cppdbg",
        "request": "launch",
        "program": "${workspaceRoot}/target/thumbv7em-none-eabihf/debug/examples/com",
        "args": [],
        "miDebuggerServerAddress": "localhost:2331",
        "stopAtEntry": true,
        "cwd": "${workspaceRoot}",
        "environment": [],
        //"externalConsole": true,
        "linux": {
          "MIMode": "gdb"
        },
        "osx": {
          "MIMode": "gdb"
        },
        "windows": {
          "MIMode": "gdb",
          "setupCommands": [{
            "text": "load"
          }],
          //"preLaunchTask": "cargo build com",
          "debugServerPath": "C:\\Program Files (x86)\\SEGGER\\JLink_V640\\JLinkGDBServerCL.exe",
          "debugServerArgs": "-select USB -device nRF52840_xxAA -endian little -if SWD -speed 4000 -noir -LocalhostOnly",
          "miDebuggerPath": "C:\\Program Files (x86)\\GNU Tools ARM Embedded\\8 2018-q4-major\\bin\\arm-none-eabi-gdb.exe",
          "miDebuggerArgs": "-q -x debug.gdb target/thumbv7m-none-eabi/debug/examples/com",
        }
      }
    ]
  }

Steps to reproduce the behavior:

  1. Use the launch.json above.

Additional context
I tried finding the source code that uses the miDebuggerPath etc, but I can't even locate the variable in this repo. So I can't even see how this extension ever uses that value. If I could, I would fix it myself, but the entire extension is really intransparent, including all the config explanations (especially the problemMatcher).

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

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

はじめの一歩

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

調査の方向性

まず、cppdbg 起動構成が launch.json の例をどのように解析するかを追跡し、debugServerPath、debugServerArgs、miDebuggerPath、miDebuggerArgs を検索します。Windows または Linux で構成を再現し、デバッガーのパスと引数が無視される理由を特定します。miDebuggerArgs を通じてアドレスが指定されている場合に miDebuggerServerAddress を必要とせず、両方の設定が debugServerPath で機能すれば完了です。

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

評価

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

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

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