跳到正文
FunCoding

uloop-pause-point

Count how many times a source file:line runs (trace mode; zero hits shows it did not run), or pause there to read locals and screenshot that exact frame, without editing code. Use after a fix to confirm whether a code path ran.

Star
606
分类
其他
许可证
MIT
最近提交
2026年11月29日

Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md

在 GitHub 上查看

uloop pause-point

A pause point captures locals at an exact frame without a source edit. Prefer it over sleeps or after-the-fact reads when input delivery, event ordering, or transition-frame fidelity matters.

Quick Check

  1. Enter PlayMode. If the game progresses on its own, pause it with control-play-mode --action Pause, arrange the scenario while paused, and add --resume-play in step 2.
  2. Arm the marker, fire the input, and wait for the hit in one foreground command:
uloop enable-pause-point --file Assets/Scripts/Enemy.cs --line 42 --timeout-seconds 60 --await --trigger "simulate-keyboard --action Press --key Space"
# paused the game in step 1? add --resume-play, or the input never lands
  1. Read CapturedVariables in the hit response first, then gather extra evidence while still paused (execute-dynamic-code, one screenshot).
  2. A single-shot marker (the default) disarms after the hit; clear other modes with uloop clear-pause-point.

Only CapturedVariables is evidence of the values at the patched line. Before deviating, read references/quick-check-template.md.

Parameters

Tables list Unity-accepted parameters plus clear's CLI-only --file/--line; other CLI-only flags (--await, --trigger, --resume-play, --expect, capture filters) are in the references.

enable-pause-point

Enable a pause point so Unity pauses when that code path is reached, either by a named UloopPausePoint.Pause marker (Id) or by resolving a source file and line (File+Line)

ParameterTypeDefaultDescription
--idstring-Named pause point id passed to UloopPausePoint.Pause. Mutually exclusive with File/Line
--filestring-Source file to patch a pause point into: Assets/..., Packages/<package-id>/..., a package folder path, or an absolute path. Requires Line; mutually exclusive with Id
--lineinteger-1-based source line to resolve within File. Requires File; mutually exclusive with Id
--timeout-secondsinteger30Seconds before the enable request expires and stops pausing late hits
--modeenumsingle-shotCapture mode: single-shot pauses once, continuous pauses on every hit, trace records hits without pausing
--hit-whenstring-Conditional capture expression (<name> <op> <literal>). Only matching hits are captured; requires File and Line
--max-historyinteger20Maximum number of captured hit frames to retain (1-100)
--max-preview-elementsinteger10Maximum elements in a captured collection's preview (1-1000). Also caps previews in later pause-point-status responses; status cannot change it.
--max-caller-framesinteger2Maximum caller stack frames recorded per hit (0-8). 0 disables capture. Also caps later pause-point-status responses; status cannot change it.
--methodstring-Optional method simple name or Type.Method. When set, --line resolves only inside matching methods
--snapshot-timingenumpre-linepre-line captures before the resolved line runs; post-line captures after that line's statement finished, without arming the next line
--persistflag-Re-arm after a domain reload (compile, Play entry); re-arm result is reported in pause-point-status

clear-pause-point

Clear one or all named UloopPausePoint.Pause markers. The response field ClearedCount is the number of markers this call transitioned to Cleared: 0 or 1 for --id, and the number transitioned for --all. Auto-disarmed and expired markers still count as 1; the record stays readable via pause-point-status (StatusBeforeClear keeps the prior state). Clearing the marker that owns the current pause releases the Editor pause and lets the game consume any state you arranged while paused: arm the next marker first, then clear the old id, or re-arm it with --await --resume-play instead of clearing.

ParameterTypeDefaultDescription
--idstring-Named pause point id to clear
--filestring-Project-relative source file of a file:line pause point. Requires --line; mutually exclusive with --id and --all
--lineinteger-1-based source line of a file:line pause point. Requires --file; mutually exclusive with --id and --all
--allflag-Clear every non-cleared pause point marker (armed, auto-disarmed, or expired)

enable-watch

Register a C# expression to evaluate on each paused Play Mode step

ParameterTypeDefaultDescription
--idstring-Unique watch expression identifier
--expressionstring-C# expression returning an object; UloopPausePoint.TryGetCapturedValue can read the latest raw capture
--max-historyinteger20Maximum number of watch evaluations to retain (1-100)

get-watch-values

Show registered watch expression values and bounded evaluation history

ParameterTypeDefaultDescription
--idstring-Optional watch expression identifier; omit to return all watches

clear-watch

Clear one or all registered C# watch expressions

ParameterTypeDefaultDescription
--idstring-Watch expression identifier to clear
--allflag-Clear every registered watch expression

Status, Timeouts, Hot Reload

Target forms for pause-point-status / await-pause-point / clear-pause-point, what to read on a timeout or enable failure, and line numbers after hot reload: references/troubleshooting.md.

Requirements & Safety

  • On the automatic Debug-switch warning: the pause point is already armed - do not interrupt or ask mid-flow.
  • Patches drop on every compile or domain reload (the compile / Play-entry responses warn). --persist re-arms automatically (references/persist.md).
  • Physics message methods, their helpers, and pre-bound delegates can miss hits on pre-existing GameObjects; enable warns where detectable.
  • An --id marker waits on your UloopPausePoint.Pause(id) call (using io.github.hatayama.UnityCliLoop.Runtime;); its hits record no CapturedVariables.
  • Every --file form resolves to the asset path (Packages/<package-id>/... for a package script), which the marker Id uses; status, await, and clear find it by any form.

Reference Guides

Read the one whose trigger matches:

  • references/quick-check-template.md — full --trigger/--await/--resume-play loop, timeouts, hit fields.
  • references/captured-variables.md — captures, name filters, --expect value forms, caller frames, raw values.
  • references/capture-modes-and-history.md — modes, history, --max-history, --hit-when.
  • references/line-placement.md — choosing the line: every-frame lines, held input, input+N frames.
  • references/watch-expressions.md — watch rules.
  • references/condition-triggered-pause.md — runtime-condition pauses.
  • references/fast-progressing-games.md — freezing self-progressing games, --resume-play.
  • references/persist.md — what --persist restores, timeout restart, first-frame gap, the re-arm report.
  • references/troubleshooting.md — timeouts, missed hits, hot reload, Debug switch, failure codes, path forms.

相似的 Skill

software-factory

MAmattpocock/skills336k近 7 天新增 5,004 个 star

claude-handoff

MAmattpocock/skills336k近 7 天新增 5,004 个 star

agent-payment-x402

AFaffaan-m/ECC314k近 7 天新增 4,125 个 star

agent-self-evaluation

AFaffaan-m/ECC314k近 7 天新增 4,125 个 star

bengali-nlp

AFaffaan-m/ECC314k近 7 天新增 4,125 个 star

ponytail-gain

DIDietrichGebert/ponytail202k近 7 天新增 4,780 个 star