👑 Premium Sign in Sign up

CSE04 · Logic & coding joy

Debugging Detective

The average-marks program gives the wrong answer. Find and fix the bugs using the failing tests as clues.

📶 L200⏱ 30 min🧪 Live lab

🎯 You will learn to

  • Read a failing test message
  • Find off-by-one and wrong-variable bugs
  • Fix one bug at a time and re-run

🧪 Live environment

Runs entirely in your browser: nothing is installed, no real cloud account is used and your code is never sent to our server.

Loading the lab…

✅ Steps & checkpoints

🗺️ Debugging loop

A failing test points at a symptom; the trace and prints narrow it to a line; the fix is checked by re-running every test.

Debugging loopA failing test points at a symptom; the trace and prints narrow it to a line; the fix is checked by re-running every test.FailingtestWrongaverageTrace /printCode undersuspicionFix onelineAll testsgreen?showsinspectnarrowif redOperationsApp / UITool / stepCompute

The 2D diagram shows the exact flow, ports and trust boundaries. The 3D scene is a concept view of the same parts; packets travel along the same arrows.

🤔 Think about it

Why is fixing one bug at a time safer than rewriting the whole function?

🛡️ Safety & cost

Runs in your browser only. Your code never leaves this page.

🧹 Cleanup

Nothing to clean up: refresh the page to start again.

📚 Reference documents

Official sources, checked on 5 Nov 2026. Cloud services change often; check the official page before relying on a feature. All references