Returning From A Procedure

The r command completes execution of the current procedure. In other words, it stops after the current procedure returns.

dbg5.18> r
3: set d 5
dbg4.19> w
 0: expect -D 1 debug-test.exp
 1: p1
*2: p2
 3: set d 5
dbg4.20> r
2: set a 3
dbg3.21> w
 0: expect -D 1 debug-test.exp
*1: p1
 2: set a 3
dbg3.22> r
1: set k 7
dbg2.23> w
*0: expect -D 1 debug-test.exp
 1: set k 7
dbg2.24> r
nowhere to return to

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.