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 摘要。