Silverfrost Logo About Us | Contact Us
 

Source code window

When SDBG is first entered the source window will display the source code for the current execution point. A red bar denotes the first line that caused SDBG to be entered. You can display the source code for any routine in the call stack (assuming the routine was compiled with debugging information) by selecting the routine from the call stack window as described above. Each routine is displayed in a separate window. The routines that are not at the top of the call stack will have their execution point marked with a brown bar.

You can move around in a source window in a manner that is very similar to a text editor or word processor. However, the text cannot be changed. The current position is marked by a cursor, which will initially be on the same line as the execution bar. You can move the cursor around the source window with the mouse or using the keyboard.

The right most edge of the source code window contains a scroll bar. You can move this either by clicking the left mouse button whilst the mouse cursor is in the scroll bar or by dragging the scroll bar (you drag the scroll bar by pressing the left mouse button and moving the mouse whilst keeping the left mouse button pressed). To move the source code up or down one line at a time, click on the arrows at the top and bottom of the scroll bar. The source window now also contains a horizontal scroll bar.

You can also use the following key presses to navigate the window:

Key

Meaning

Left arrow

Left one character

Right arrow

Right one character

Up arrow

Up one line

Down arrow

Down one Line

Page Up

Up one page

Page Down

Down one page

Ctrl+Home

Start of file

Ctrl+End

End of file

Ctrl+Page Up

Move up the call stack

Ctrl+Page Down

Move down the call stack

Home

Start of current line

End

End of current line

Ctrl+O

Go to instruction point (Origin)

Ctrl+G

Go to line number

Ctrl+S

Search for text (case insensitive)

Ctrl+A

Search for text specified by the last Ctrl+S command

 

The Win32 debugger has buttons on the toolbar to move up and down the call stack. They also have a bookmark facility. This is accessed by selecting Bookmarks from the Window menu. Bookmarks can be set, used or deleted.

The most common actions performed on source code in a debugger are usually 1) setting breakpoints, 2) single stepping and 3) running the program. Several key strokes are available to help you do this.

These are summarised in the table below:

Key

Meaning

F2

Set or reset breakpoint

Shift+F2

Set or reset a conditional breakpoint

F3

Get to current line

F6

Run program

F7

Step to next source line

F8

Step to next source line and step over any routine calls

 

 

Copyright © 1999-2017 Silverfrost Limited