---
title: "Testing and debugger"
subject: "Embedded System"
chapter: 3
key: "semester_6/embedded_system:testing-and-debugger"
source: https://www.bctengineer.com/q/semester_6/embedded_system/testing-and-debugger
site: BCT Engineering
---

# Testing and debugger

Embedded System · Chapter 3: Software Design Issues

- Asked in: 2070 Bhadra, 3 marks
- Video: [Logic Analyzer | System Integration Testing and Debugging Methodology | Embedded System & RTOS](https://www.youtube.com/watch?v=cXnWvcVQv1g) — Ekeeda
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/embedded_system/testing-and-debugger
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-3

## Question

Explain the testing and debugger.

## Short answer

Testing verifies requirements through unit, integration, system, and acceptance tests, including timing and hardware interaction. A debugger locates errors via single stepping, breakpoints, inspection of registers/memory. Embedded debuggers include simulator, ROM monitor, ICE, and JTAG/on-chip debug, often with logic analyser.

## Answer

**Testing** is checking that the software or system meets its requirements and finding errors by running it with test inputs. Levels: unit, integration, system and acceptance testing; methods: black-box (inputs/outputs only) and white-box (internal logic). In embedded systems, tests must also check timing, interrupts, memory use and hardware interaction on the target.

**Debugger** is a tool that helps locate and remove the errors found by testing. It allows the developer to:
- run the program step by step (single stepping) and set **breakpoints**;
- inspect and change registers, memory and variables;
- trace the execution path and watch variables.

Types used in embedded work: **simulator** (host-based, no hardware), **monitor/ROM debugger** (a small resident program on the target talking over a serial link), **in-circuit emulator (ICE)** (replaces the processor, real-time control and tracing), and **JTAG/on-chip debug** (debug through a dedicated port on the chip). A logic analyser or oscilloscope can also be used for hardware timing problems.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How do testing and debugging differ?
   A. Testing removes errors; debugger finds them
   B. They are the same
   C. Testing finds errors; the debugger helps locate and remove them
   D. Debugger writes requirements
   Answer: C. Testing runs inputs to detect errors; the debugger helps trace their cause. (Key point: Testing vs debugger)

2. What is black-box testing?
   A. Testing internal logic
   B. Testing hardware only
   C. Testing without inputs
   D. Testing using inputs and outputs only
   Answer: D. White-box testing examines internal logic instead. (Key point: Black-box)

3. What is an in-circuit emulator?
   A. A tool that replaces the processor, giving real-time control and tracing
   B. A host-based simulator
   C. A serial monitor program
   D. A logic analyser
   Answer: A. ICE replaces the target processor for real-time debugging. (Key point: ICE)
