โ† Home BP ยท 7-9 ๐Ÿ•ต๏ธ

Bug Detective

74
Day 1 ๐Ÿ”ฅ
๐ŸŽฏ Today's Missions
๐Ÿ” ๐Ÿž ๐Ÿ—‚๏ธ ๐Ÿ”Ž
๐Ÿ•ต๏ธ
Detective Agency Universe
Bug Detective
Every coder writes bugs โ€” even pros! DEBUGGING is how you catch them: read the code, spot the sneaky line, fix it, then run the test again. Today you get a magnifying glass and 5 real cases to solve! ๐Ÿ”

๐Ÿ•ต๏ธ What we're MAKING today: My Case Board

You already know variables (Memory Boxes), comparisons (Spotlight Chief), loops (Caterpillar Crawl), and AND/OR logic (Logic Boss). But here's a secret: even professional coders write code that goes WRONG โ€” we call the mistake a bug ๐Ÿž. The skill of finding and fixing bugs is called debugging, and it's the #1 job of every real engineer!

The debug loop has 4 steps: 1. READ the code line by line โ†’ 2. SPOT the line that's wrong โ†’ 3. FIX it โ†’ 4. TEST again. If it's still broken... loop back and look again! ๐Ÿ”

๐Ÿ”— Way back in Bug Squash (when you were 4-6!) you tapped the one broken block. Now you're older: you read REAL code lines, compare them to what SHOULD happen, and catch sneaky bugs like typos, wrong numbers, and flipped logic. Welcome to the big leagues, Detective! ๐Ÿ•ต๏ธ
case-file.js JavaScript

    
๐Ÿ’ก The bug hides on ONE line. Find it! read โ†’ spot โ†’ fix โ†’ test
case board LIVE
๐Ÿž BUG DETECTED
๐ŸŽ‚
The Case of the Sad Cake
โŒ What happened
๐Ÿ“ Case
1 / 5
โœ… Solved
0
๐ŸŽ–๏ธ Rank
Rookie ๐Ÿ”
Step 1 / 5
Read the code and the broken result. Tap the line where the bug is hiding!
๐Ÿ” Where is the bug hiding? STEP 2 ยท SPOT
๐Ÿ•ต๏ธ Detective rule: read the COMMENT first โ€” it tells you what the code SHOULD do. Then find the line that doesn't do it!
๐Ÿ“‹ Your 5 Detective Cases
0 of 5 cases solved
๐Ÿ•ต๏ธ
You Mastered Bug Detective!
You solved all 5 cases using the real debug loop โ€” read, spot, fix, test! Professional engineers do EXACTLY this every day. Bugs aren't failures... they're puzzles waiting for you! ๐Ÿž๐Ÿ”

๐Ÿ’ซ What You Learned

  • A bug is a mistake in code โ€” and debugging means finding & fixing it
  • The debug loop: READ โ†’ SPOT โ†’ FIX โ†’ TEST โ€” and loop again if it's still wrong!
  • Bugs hide in many shapes: wrong values, flipped comparisons (< vs >), wrong loop counts, mixed-up AND/OR, and typos in names!
  • Read the comment โ€” it tells you what the code SHOULD do, so you can spot what doesn't
  • The line that breaks isn't always the line that's wrong โ€” like the typo that broke the scoreboard!
๐Ÿ•ต๏ธ Your Creation
My Case Board
๐Ÿ” Come Back Tomorrow!
Next up: Console Explorer โ€” real detectives leave secret notes everywhere! Learn console.log(), the magic message tool coders use to spy on their code and squash bugs even FASTER! ๐Ÿ’ฌ
๐Ÿ  Home
Nice! ๐ŸŽ‰