Stack Window

The Stack window lists stack frames, each of which corresponds to a subprogram call.

The Stack window contains the following elements:

Upward pointing arrow

Click the upward pointing arrow at the top right corner to undock the window from the Debug Console.

Downward pointing arrow

Click the downward pointing arrow at the top right corner to dock the window in the Debug Console.

Pop-up menu commands

Pop-up menu commands (right-click in Windows) are accessible from the colored header (docked window) or the first line below the window title (undocked window). The commands available are:

  • Dock - Docks a floating debug window inside the Debug Console. Command is disabled when a window is docked in the console.
  • Undock - Makes a docked debug window float outside the Debug Console. Command is disabled when a window is floating outside the console.
  • Hide - Closes an opened docked or floating window.

Stack Frames

Stack frames are listed in the reverse order the subprogram calls are executed. The latest stack frame is at the top of the stack, while the earliest frame is at the bottom of the stack. Each stack frame represents a subprogram call in the call chain, and it is identified by an icon, a name and line number; the name follows one of the following formats:

ModuleName.TriggerName (BlockName.ItemName)::LineNumber

ModuleName.ProgramUnitName::LineNumber

PackageName.ProgramUnitName::LineNumber

SchemaName.StoredProgramUnitName::LineNumber

SchemaName.StoredPackageName.ProgramUnitName::LineNumber

The line number represents the current execution location in the stack frame.

For example, consider the module trigger that executes procedure COUNT_LOOPS which in turns calls procedure DO_MESSAGE. When execution is suspended at line 4 of procedure DO_MESSAGE, the stack frames would appear as follows:

MODULE_A.DO_MESSAGE::4

MODULE_A.COUNT_LOOPS::4

MODULE_A.WHEN_BUTTON_PRESSED::2

The Stack window is automatically displayed for you when an executing program is suspended by a breakpoint. When a breakpoint is encountered or when execution is suspended, the current stack frame is initialized to the execution location of the subprogram at the top of the stack.

The current stack frame is where the debugger looks for variables and parameters associated with the state of the subprogram in the stack. You can change the current frame by selecting another frame on the stack.

When you change the current frame in the stack, affected debug windows are updated with the relevant content. For example, the current frame selected in the stack causes the current frame in the Variables window to change accordingly. At the same time, the Object Navigator scrolls to the source unit of the subprogram in the new frame, and the PL/SQL Editor displays the source code.

Changing the current stack frame, however, does not change the statement that will be executed when the application resumes running. The current execution location in the topmost stack frame contains the next statement to be executed.



Hide and Show a Debug Window

Hide and Show the Debug Console

Resize a Debug window in the Debug Console

Resize Columns in a Debug Window

Undock and Dock a Debug Window