Technical Q&A QA1675

Using Breakpoint Actions for Logging

Q:  How do I use Breakpoint Actions for logging debug messages?

A: Traditionally, many programmers have used printf, NSLog, and similar facilities for tracing execution through in code. Similar functionality can be achieved using Breakpoint Actions, which allow you to attach a set of log expressions to a standard debugging breakpoint.

The steps for logging via a Breakpoint Action are:

Figure 1  Breakpoint Menu:
Figure 2  Breakpoints Window:
Figure 3  Breakpoint Action logging example:


Document Revision History


DateNotes
2015-03-09

Moved to Retired Documents Library.

2009-12-09

First Version