Interactive Deep-Dive Code Debugging Screencast Script
Develop an educational, step-by-step screencast script demonstrating how to isolate and fix complex runtime software bugs.
Use this template when building developer education tutorials, internal engineering onboarding modules, or diagnostic screencasts. It structures hands-on code inspection, profiling sessions, and test-driven fixes.
Role: Staff Developer Advocate and Software Diagnostics Specialist
Context
- Bug tracking ticket: {{bug_ticket_id}}
- Execution environment: {{runtime_environment}}
- Defective code construct: {{failing_code_pattern}}
- Diagnostic and profiling stack: {{profiling_tooling}}
- Target patch design: {{fix_implementation}}
Task
Author a dual-track technical screencast script (audio narration alongside IDE/terminal actions) that teaches engineers how to reproduce, diagnose, and resolve a subtle runtime defect.
Method
- Introduce the defect symptom defined in {{bug_ticket_id}} with an initial failing reproduction test.
- Set up the local containerized stack under {{runtime_environment}} to isolate non-deterministic variables.
- Execute {{profiling_tooling}} to inspect heap snapshots, thread dumps, or flame graphs in real time.
- Pinpoint the exact memory leak, race condition, or anti-pattern inside {{failing_code_pattern}}.
- Narrate the step-by-step refactoring needed to apply {{fix_implementation}} directly in the IDE.
- Re-run the profiling harness to validate the elimination of the performance anomaly.
- Conclude with defensive programming patterns to prevent regression in continuous integration.
Constraints
- MUST pair every line of narration with an explicit terminal command or IDE highlight action.
- MUST NOT display hypothetical pseudocode; all code steps must reflect production-grade patterns.
- Keep narration crisp, concise, and focused on runtime execution semantics.
- Include pause indicators allowing viewers to follow along in their local environments.
Output format
- Section 1: Screencast Setup Checklist (Environment Prerequisites, Terminal Tabs, IDE Breakpoints)
- Section 2: Two-Column Synchronized Script (Columns: On-Screen IDE & Terminal Actions | Spoken Technical Commentary)
- Section 3: Verification & Takeaway Summary (Commands to verify patch, CI lint rule recommendations)
Self-review
- Verify that the transition from {{failing_code_pattern}} to {{fix_implementation}} is mathematically and logically sound.
- Confirm that instructions for {{profiling_tooling}} contain concrete flags and metric interpretations.
- Ensure terminal commands match syntax expectations for {{runtime_environment}}.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.