teaceo-debug/DEEP6 / .claude/skills/tradingview-pinescript-error-doctor
tradingview-pinescript-error-doctor
Verified| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.2 KB |
| errors/common-compile-errors.md | markdown | 1.1 KB |
| errors/drawing-object-errors.md | markdown | 3.2 KB |
| errors/loop-and-scope-errors.md | markdown | 2.4 KB |
| errors/official-error-codes.md | markdown | 1.9 KB |
| errors/request-security-errors.md | markdown | 3.2 KB |
| errors/type-system-errors.md | markdown | 4.1 KB |
| knowledge.md | markdown | 6.3 KB |
| patterns/debug-instrumentation.md | markdown | 1.7 KB |
| patterns/quick-fixes.md | markdown | 2.1 KB |
| playbooks/alert-debugging.md | markdown | 4.3 KB |
| playbooks/expert-checklist.md | markdown | 993 B |
| playbooks/repainting-and-mtf.md | markdown | 1004 B |
| playbooks/repair-workflow.md | markdown | 588 B |
| playbooks/version-migration.md | markdown | 2.9 KB |
patterns/debug-instrumentation.md
View on GitHub# Debug Instrumentation Patterns
Last verified: 2026-05-22
Use this file when a script compiles but you need to expose hidden state before making a permanent fix.
## `plotchar()` for boolean visibility
```pine
plotchar(longSignal, title = "longSignal", char = "L", location = location.abovebar, color = color.lime)
```
Best for confirming whether a condition ever becomes true.
## `plot()` for numeric debug values
```pine
plot(score, title = "score", color = color.aqua)
plot(threshold, title = "threshold", color = color.orange)
```
Best for thresholds, rolling values, offsets, and MTF state.
## `label.new()` on `barstate.islast` for state snapshots
```pine
if barstate.islast
label.new(time, high, "state=" + state, xloc = xloc.bar_time)
```
Use sparingly. Repeated last-bar labels still need cleanup or singleton reuse.
## `table.new()` with `var` for multi-field dashboards
```pine
var table dbg = table.new(position.bottom_right, 2, 4)
if barstate.islast
table.cell(dbg, 0, 0, "state")
table.cell(dbg, 1, 0, state)
table.cell(dbg, 0, 1, "score")
table.cell(dbg, 1, 1, str.tostring(score))
```
Prefer tables when you need several fields at once without polluting the chart with labels.
## `log.info()` for Pine Logs pane debugging (v6)
```pine
if barstate.islast
log.info("state={0} score={1}", state, score)
```
Best for structured diagnostics that should not alter chart visuals.
## When to remove debug output
Remove or disable instrumentation before stable release when:
- plots change user-facing chart interpretation
- labels/tables consume object budget
- logs spam the Pine Logs pane
- debug paths hide the real business logic
If a debug view remains valuable for operators, convert it into an explicit `showDebug` input.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |