This specification defines the detailed functionality and execution guidelines for debugging in natural language macro programming.
"Execute [processing content] in debug mode"
- Simple Debug: "Execute in simple debug mode"
- Standard Debug: "Execute in debug mode"
- Detailed Debug: "Execute in detailed debug mode"
- Variable Tracking: "Execute while debug tracking variable {{name}}"
- Conditional Branching: "Execute while debugging conditional branching"
- Error Details: "Execute with detailed explanations when errors occur"
[DEBUG] Step [number]: [description of execution content]
[DEBUG] Variable State: {{variable_name}} = [current value]
[DEBUG] Decision Rationale: [reason for condition evaluation]
[DEBUG] Next Action: [next processing to execute]
[DEBUG] Step 1: Saving weather information to variable {{weather}}
[DEBUG] Execution Content: Retrieve today's weather via web search
[DEBUG] Variable State: {{weather}} = "Sunny, temperature 25°C, humidity 60%"
[DEBUG] Decision Rationale: Sunny → sun protection needed, 25°C → heat protection needed
[DEBUG] Next Action: Generate clothing suggestions based on {{weather}}
[DEBUG] Step 2: Evaluating condition "{{score}} >= 80"
[DEBUG] Variable State: {{score}} = 85
[DEBUG] Condition Analysis: 85 >= 80 = true
[DEBUG] Decision Rationale: 85 is 80 or above, proceeding to high evaluation branch
[DEBUG] Branch Decision: Select excellent evaluation message generation route
[DEBUG] Next Action: Generate excellent evaluation message
[DEBUG] Compound Condition Analysis:
- Condition A: {{weather}} == "rain" → "rain" == "rain" = true
- Condition B: {{temperature}} < 20 → 15 < 20 = true
- Condition C: {{plan}} == "outdoor" → "outdoor event" contains "outdoor" = true
[DEBUG] Compound Judgment: (A AND B AND C) = (true AND true AND true) = true
[DEBUG] Decision Rationale: All conditions satisfied, executing rainy weather outdoor countermeasure route
- Display only important variable changes
- Report only major conditional branching results
- Minimize output volume
- Display all variable operations
- Explain detailed evaluation processes of conditional branching
- Explicitly show decision rationales and next actions
- Display intermediate calculation processes in detail
- Explain internal operations of error handling
- Report including performance information
[DEBUG] Error Detection: [error overview]
[DEBUG] Error Details: [specific error content]
[DEBUG] Occurrence Location: Step [number] - [processing content]
[DEBUG] Variable State: [variable values at error occurrence]
[DEBUG] Cause Analysis: [estimated cause of error]
[DEBUG] Correction Suggestion: [proposed solution]
[DEBUG] Alternative Execution: [possible alternative processing]
[DEBUG] Error Detection: Invalid budget value set
[DEBUG] Error Details: {{budget}} = -50000 (negative value is invalid)
[DEBUG] Occurrence Location: Step 3 - Budget data validation processing
[DEBUG] Variable State: {{budget}} = -50000, {{required_qty}} = 0
[DEBUG] Cause Analysis: Insufficient input data validity check
[DEBUG] Correction Suggestion: Correct budget to positive value (e.g., 150,000 yen)
[DEBUG] Alternative Execution: Continue processing with default budget of 100,000 yen
- Transparency: Explicitly show all decision processes
- Traceability: Completely record variable transitions
- Ease of Understanding: Explanations understandable by non-technical users
- Practicality: Provide information directly useful for problem solving
- Load debugger.md: Enable debug functionality
- Execute Debug Instructions: Specify appropriate detail level
- Analyze Output: Identify problems based on debug information
- Debug output may become voluminous
- Pay attention to output content when confidential information is involved
- Particularly useful for long-term workflows