# yunfei899/debugging-panel architecture

> Architecture diagram of the GitHub repository yunfei899/debugging-panel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yunfei899/debugging-panel
- Repository: https://github.com/yunfei899/debugging-panel

## Overview

This repository provides a shared XDS2xx debugging workflow: an engineer opens the shared panel, issues debug commands, and monitors or controls a target through CCS scripting. The tree also documents a semi-automated online-debugging flow and migration guidance. The sampled AutoDebugHold script confirms target connection, program or symbol loading, breakpoint management, command handling, and status/event reporting. Other PowerShell components are represented by their names and documented context; their internal wiring is not verified in the available excerpts.

Main entry points: [`Tools/SharedDebugPanel.ps1`](https://github.com/yunfei899/debugging-panel/blob/master/Tools/SharedDebugPanel.ps1) (Shared panel), [`Tools/AutoDebugHold.js`](https://github.com/yunfei899/debugging-panel/blob/master/Tools/AutoDebugHold.js) (Auto debug hold), [`打开共享调试面板.bat`](https://github.com/yunfei899/debugging-panel/blob/master/%E6%89%93%E5%BC%80%E5%85%B1%E4%BA%AB%E8%B0%83%E8%AF%95%E9%9D%A2%E6%9D%BF.bat) (Open panel), [`Tools/StartSharedDebug.ps1`](https://github.com/yunfei899/debugging-panel/blob/master/Tools/StartSharedDebug.ps1) (Start debug)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_panel["Shared debug panel"]
  node_launch["Open panel<br/>[打开共享调试面板.bat]"]
  node_panel_ui["Shared panel"]
  node_config["Shared config"]
end

subgraph group_runtime["Debug runtime"]
  node_start["Start debug"]
  node_command["Send command"]
  node_runner["Debug runner<br/>[RunSharedDebug.ps1]"]
  node_autohold["Auto debug hold<br/>[AutoDebugHold.js]"]
  node_status["Status and events"]
end

subgraph group_guidance["Debug workflows"]
  node_manual["Panel manual"]
  node_migration["Migration guide"]
  node_online["Online debug flow"]
end

node_engineer(("Engineer"))
node_target{{"XDS2xx target"}}

node_engineer -->|"opens"| node_launch
node_launch -->|"launches"| node_panel_ui
node_panel_ui -->|"uses config"| node_config
node_panel_ui -->|"starts debug"| node_start
node_panel_ui -->|"sends commands"| node_command
node_start -->|"runs"| node_runner
node_runner -->|"invokes"| node_autohold
node_autohold -->|"controls"| node_target
node_autohold -->|"writes status"| node_status
node_engineer -.->|"consults"| node_manual
node_engineer -.->|"consults"| node_migration
node_engineer -.->|"follows"| node_online

click node_launch "https://github.com/yunfei899/debugging-panel/blob/master/%E6%89%93%E5%BC%80%E5%85%B1%E4%BA%AB%E8%B0%83%E8%AF%95%E9%9D%A2%E6%9D%BF.bat"
click node_panel_ui "https://github.com/yunfei899/debugging-panel/blob/master/Tools/SharedDebugPanel.ps1"
click node_config "https://github.com/yunfei899/debugging-panel/blob/master/Tools/SharedDebugConfig.ps1"
click node_start "https://github.com/yunfei899/debugging-panel/blob/master/Tools/StartSharedDebug.ps1"
click node_command "https://github.com/yunfei899/debugging-panel/blob/master/Tools/SendSharedDebugCommand.ps1"
click node_runner "https://github.com/yunfei899/debugging-panel/blob/master/Tools/RunSharedDebug.ps1"
click node_autohold "https://github.com/yunfei899/debugging-panel/blob/master/Tools/AutoDebugHold.js"
click node_manual "https://github.com/yunfei899/debugging-panel/blob/master/docs/XDS2xx%E5%85%B1%E4%BA%AB%E8%B0%83%E8%AF%95%E9%9D%A2%E6%9D%BF%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8C.md"
click node_migration "https://github.com/yunfei899/debugging-panel/blob/master/docs/XDS2xx%E5%85%B1%E4%BA%AB%E8%B0%83%E8%AF%95%E9%9D%A2%E6%9D%BF%E8%BF%81%E7%A7%BB%E8%AF%B4%E6%98%8E.md"
click node_online "https://github.com/yunfei899/debugging-panel/blob/master/docs/XDS2xx%E5%8D%8A%E8%87%AA%E5%8A%A8%E5%8C%96%E8%81%94%E6%9C%BA%E8%B0%83%E8%AF%95%E6%B5%81%E7%A8%8B.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launch,node_panel_ui,node_config toneBlue
class node_start,node_command,node_runner,node_autohold,node_status toneAmber
class node_manual,node_migration,node_online toneMint
class node_engineer,node_target toneIndigo
```

## Components

### Shared debug panel

- [Open panel](https://github.com/yunfei899/debugging-panel/blob/master/%E6%89%93%E5%BC%80%E5%85%B1%E4%BA%AB%E8%B0%83%E8%AF%95%E9%9D%A2%E6%9D%BF.bat): `打开共享调试面板.bat`
- [Shared panel](https://github.com/yunfei899/debugging-panel/blob/master/Tools/SharedDebugPanel.ps1): `Tools/SharedDebugPanel.ps1`
- [Shared config](https://github.com/yunfei899/debugging-panel/blob/master/Tools/SharedDebugConfig.ps1): `Tools/SharedDebugConfig.ps1`

### Debug runtime

- [Start debug](https://github.com/yunfei899/debugging-panel/blob/master/Tools/StartSharedDebug.ps1): `Tools/StartSharedDebug.ps1`
- [Send command](https://github.com/yunfei899/debugging-panel/blob/master/Tools/SendSharedDebugCommand.ps1): `Tools/SendSharedDebugCommand.ps1`
- [Debug runner](https://github.com/yunfei899/debugging-panel/blob/master/Tools/RunSharedDebug.ps1): `Tools/RunSharedDebug.ps1`
- [Auto debug hold](https://github.com/yunfei899/debugging-panel/blob/master/Tools/AutoDebugHold.js): `Tools/AutoDebugHold.js`
- **Status and events**

### Debug workflows

- [Panel manual](https://github.com/yunfei899/debugging-panel/blob/master/docs/XDS2xx%E5%85%B1%E4%BA%AB%E8%B0%83%E8%AF%95%E9%9D%A2%E6%9D%BF%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8C.md): `docs/XDS2xx共享调试面板使用手册.md`
- [Migration guide](https://github.com/yunfei899/debugging-panel/blob/master/docs/XDS2xx%E5%85%B1%E4%BA%AB%E8%B0%83%E8%AF%95%E9%9D%A2%E6%9D%BF%E8%BF%81%E7%A7%BB%E8%AF%B4%E6%98%8E.md): `docs/XDS2xx共享调试面板迁移说明.md`
- [Online debug flow](https://github.com/yunfei899/debugging-panel/blob/master/docs/XDS2xx%E5%8D%8A%E8%87%AA%E5%8A%A8%E5%8C%96%E8%81%94%E6%9C%BA%E8%B0%83%E8%AF%95%E6%B5%81%E7%A8%8B.md): `docs/XDS2xx半自动化联机调试流程.md`

### Other components

- **Engineer**
- **XDS2xx target**

## Connections

- Engineer → Open panel: opens
- Open panel → Shared panel: launches
- Shared panel → Shared config: uses config
- Shared panel → Start debug: starts debug
- Shared panel → Send command: sends commands
- Start debug → Debug runner: runs
- Debug runner → Auto debug hold: invokes
- Auto debug hold → XDS2xx target: controls
- Auto debug hold → Status and events: writes status
- Engineer → Panel manual: consults
- Engineer → Migration guide: consults
- Engineer → Online debug flow: follows
