Inspecting Values

When you inspect your program's local variables, you can also evaluate any expression that involves those variables. You can also call any of the program's functions, except for the function you are currently debugging.

Writing Debug Code

UnderC lends itself to a development style in which you work on simple functions and test them individually; you end up with a set of operations you can trust that are convenient for the programs you are writing. You should write some functions specifically to help you debug your program (for example, code that dumps out the contents of a list in comprehensible form or performs sanity checks on data structures). This takes care and effort, but it nearly always makes a difference in a big project. ...

Get C++ By Example: UnderC Learning Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.