framework_eng/skills/tool-usage/diagnostics/agent-debug/SKILL.md
Trace BSL when the event log/screenshots do not explain the failure
npx skillsauth add steelmorgan/1c-agent-based-dev-framework agent-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Trigger | Action | |---------|----------| | Standard diagnostics do not explain the behavior | Insert debug points | | A hypothesis about the cause of the error needs confirmation or refutation | Log key values | | It is unclear which code branch is executing | Place markers on branches |
DO NOT use if the answer can be obtained by reading the code, event log, or a screenshot.
//[AGENTDEBUG-001]
ЗаписьЖурналаРегистрации("AgentDebug",
УровеньЖурналаРегистрации.Информация, , ,
"STEP=001 PROC=ОбработкаПроведения MSG=Проверка суммы"
+ " | СуммаДокумента=" + Строка(СуммаДокумента)
+ " | Статус=" + Строка(Статус));
///[AGENTDEBUG-001]
//[AGENTDEBUG-NNN]///[AGENTDEBUG-NNN] (three slashes)| Parameter | Value | Why |
|----------|----------|-------|
| ИмяСобытия | "AgentDebug" | Filtering: all debug records with one query |
| Уровень | Информация | Reliably saved in the event log (Note may not be saved) |
| МетаданныеОбъекта | Неопределено or a specific object | If obvious, specify for additional filtering |
| Данные | Object reference or Неопределено | For correlation with a specific document/item |
| Комментарий | STEP=NNN PROC=... MSG=... \| key=value | Structured format, easy to parse |
STEP=001 PROC=ОбработкаПроведения MSG=Краткое описание гипотезы | Ключ1=Значение1 | Ключ2=Значение2
STEP — point number (matches the marker)PROC — procedure/function nameMSG — what is being checked (hypothesis)| — key values in key=value format//[AGENTDEBUG-NNN] ... ///[AGENTDEBUG-NNN]ИмяСобытия = "AgentDebug", sort by timeIf one iteration is not enough, adjust the points and repeat (steps 2-6). If you need 10+ points, the hypothesis is too broad; split it into several.
Order of finding a suitable place:
It is preferable to delegate code inspection to a sub-agent (Explorer / code-navigation).
MUST before completing the task:
AGENTDEBUG — no occurrences should remainRemove line by line:
//[AGENTDEBUG-NNN]///[AGENTDEBUG-NNN] inclusive| Anti-pattern | Consequence | |-------------|-------------| | Production code inside a debug block | Removing the block will break business logic | | Debug blocks left in the final code | Event log clutter, data leakage | | 10+ points for one hypothesis | Overly broad hypothesis, unclear result | | Logging value tables / large structures | Event log overflow, slowdown | | Free text instead of key=value | Hard to parse during analysis |
depends_on:
development
1C server maintenance webhooks: container restart and external component cache cleanup
development
Interactive DAP debugging of a single BSL procedure
tools
Rules for using RLM tools for project search and navigation in 1C/BSL
development
Creates web applications and routes on Winow (a web server on OneScript and Autumn). Use when working with a web server on OneScript, routing, or Winow controllers.