Validate debug adapter settings before launching, beyond the TTD trace path

未關閉
#1,146 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
cpp
領域
devtools

研究方向

Start with AdapterSettingsDialog::apply() and validateSettings(), then read the duplicated check in DbgEngTTDAdapter::ExecuteWithArgsInternal and the settings model in SettingsView. Compare the listed adapter settings and the two validation approaches; done means the chosen validation mechanism covers dialog, launch, and headless paths without leaving the current checks duplicated.

由索引模型根據 Issue 內容生成。

描述

enhancement UI

#910 / #1145 added validation for one specific case: the DBGENG_TTD adapter with no launch.trace_path set. That check lives in AdapterSettingsDialog::apply() and is deliberately narrow — it only covers the setting whose absence is guaranteed to fail the launch, so the dialog does not get in the way of anything an adapter would otherwise accept.

The same class of problem exists elsewhere. Settings that are required, or that point at a path which does not exist, are generally accepted by the dialog and only surface later as an adapter-specific error, if at all. Some candidates:

  • common.inputFile — pointing at a file that no longer exists
  • Working directory settings that name a nonexistent directory
  • Remote host / port for the connect and debug-server flows: empty host, port 0, unparseable input
  • Windows kernel and dump file adapters, where the target path is equally non-optional
  • Executable path for the local adapters

Worth deciding on the mechanism before adding cases one at a time. Options:

  1. Keep extending validateSettings() in AdapterSettingsDialog with per-adapter special cases. Simple, but the UI ends up knowing adapter-specific rules, and it does nothing for headless use.
  2. Give DebugAdapterType (or the adapter) a validation entry point that returns the problems for the current settings, and have the dialog surface whatever it reports. Keeps the rules next to the adapter that owns them and can be reused by the launch path and headless callers.

Option 2 seems better long term. The #1145 change also duplicates the check in DbgEngTTDAdapter::ExecuteWithArgsInternal so scripted and dialog-skipped (#1133) launches are covered; a shared entry point would remove that duplication.

Separately, SettingsView could grow support for marking a setting as required, so the failure is visible in the settings UI itself rather than only in a message box on Accept.

主要語言
C++
星號
342
分支
34
平均合併
7 天 21 小時
30 天內合併 PR
1

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Vector35/debugger 的其他 Issue

查看 Vector35/debugger 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。