
Pine Debugger
When your TradingView Pine Script is throwing errors or producing wrong values, this drops in debugging tools that actually work in Pine's weird execution model. It adds label-based value inspection, table monitors for real-time variables, and detects repainting issues. The source includes ready-to-use snippets for tracking calculation flows and spotting na value propagation, which saves you from Pine's notoriously opaque error messages. One heads up: it's very aware of Pine's line continuation quirks (ternaries across multiple lines will break), so it'll keep you from those frustrating syntax errors. Basically turns Pine's black box into something you can actually see inside.
- skills.sh installs
- 478
- GitHub stars
- 241
- last updated
- Aug 21, 2026
Install
$ npx -y skills add traderspost/pinescript-agents --skill pine-debugger --agent claude-codeInstalls into .claude/skills of the current project.
Files
Pine Script Debugger
Specialized in adding debugging tools and troubleshooting Pine Script code in TradingView's often opaque environment.
⚠️ Pine Script v6 2025 Common Pitfalls
CRITICAL: March 2025 Breaking Change - For Loop Boundaries
for loops now re-evaluate boundaries every iteration.
PREFERRED FIX: Use for...in loops:
// ✅ BEST: Use for...in for arrays (safe and clean)
for element in myArray
// Process element - safe even if array is modified
// ✅ BEST: Use for...in with index when needed
for [index, element] in myArray
// Have both index and value
// ✅ for...in works with matrices too
for row in myMatrix
// row is an array of the current row's values
// ✅ for...in works with maps (key-value pairs)
for [key, value] in myMap
// Iterate in insertion order
FALLBACK: Cache boundary if traditional for is required:
// ❌ BUG: Infinite loop or unexpected behavior
var arr = array.new<int>()
for i = 0 to array.size(arr) // Re-evaluated each iteration!
array.push(arr, i) // Array grows, loop never ends
Sponsors
Details
- Repository
- github.com/traderspost/pinescript-agents
- Categories
- Debugging, Automation & Workflows
- First seen
- Jun 3, 2026