> ## Documentation Index
> Fetch the complete documentation index at: https://niceeval.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 运行前检查生命周期计划

> 用 niceeval debug 查看一个 Experiment 与评估用例配对的 Plugin、Sandbox、Agent、Fixture 和 teardown 顺序，而不创建任何运行资源。

`exp --dry` 适合确认运行矩阵。需要检查一条评估在 Sandbox 里会按什么顺序准备、安装、执行和收尾时，使用 `niceeval debug`。

## 选择一个精确配对

```sh theme={null}
pnpm exec niceeval debug compare/codex memory/commit0
```

Experiment 和评估用例 selector 都必须唯一。精确 ID 优先；前缀命中多个候选时，CLI 会列出候选并停止。

评估用例只能从该 Experiment 已选择的范围中匹配。选择一个评估组成员不会把其它成员加入计划，但输出仍会显示评估组生命周期包裹。

## 按顺序阅读计划

计划会依次显示：

1. Plugin lifecycle；
2. 作者声明的 prepare；
3. Agent ensure、setup 与 teardown；
4. Sandbox materialize 与 Provider finalizer；
5. 评估组和物理 Sandbox lifecycle；
6. Fixture、test 与 cleanup。

静态 `shell()` 和 `command()` 会展开实际命令。普通 callback 标为 `Opaque`，因为它只能在运行时执行。路径、凭据、环境变量值和不安全的远端 locator 不会泄露到 Human 输出。

## 给工具读取结构化计划

```sh theme={null}
pnpm exec niceeval debug compare/codex memory/commit0 --json > debug-plan.json
```

JSON 保留结构化步骤和精确度标记，不包含终端框线。`debug` 只接受 `--json`；预算、重跑、并发等运行 flag 不适用于这个命令。

## 确认它不会执行资源操作

`debug` 不运行 setup、test、teardown、ensure、materialize 或 finalizer，也不创建 Invocation、Run、Record、锁、Sandbox 或构建任务。

它会加载受信任定义并执行 Experiment 的选择 predicate。Provider planner 也可能读取本地文件、调用只读 CLI 或查询远端控制面，因此仍应只在可信项目中运行。

矩阵和 Attempt 数量先用[选择并预览运行范围](/docs/zh/tutorials/select-and-preview)确认。真实执行失败后需要进入保留现场时，使用[保留 Sandbox 现场排查问题](/docs/zh/troubleshooting/debug-sandbox)。
