Changing Program Behavior

When the debugger is active, the variable dbg is defined in the global scope. When the debugger is not active, dbg is not defined nor are the debugger commands such as s and n. This allows scripts to behave differently when the debugger is running.

Get Exploring Expect 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.