Next: , Previous: Compiling Programs, Up: Debugging IDL Programs

5.4.5 Walking the Calling Stack

While debugging a program, it can be very useful to check the context in which the current routine was called, for instance to help understand the value of the arguments passed. To do so conveniently you need to examine the calling stack. If execution is stopped somewhere deep in a program, you can use the commands C-c C-d C-<UP> (idlwave-shell-stack-up) and C-c C-d C-<DOWN> (idlwave-shell-stack-down), or the corresponding toolbar buttons, to move up or down through the calling stack. The mode line of the shell window will indicate the position within the stack with a label like ‘[-3:MYPRO]’. The line of IDL code at that stack position will be highlighted. If you continue execution, IDLWAVE will automatically return to the current level. See Examining Variables, for information how to examine the value of variables and expressions on higher calling stack levels.