Source Window

Display the source code lines of the debuggee and their corresponding numbers.

Menu

Not available. To access this window, select Show Source File from the pop-up menu of the Source Files window. To access that window, select View > Source Files.

Toolbar

Not available.

A blue dot at a source line indicates available debug information. The current line, the source code line to be executed next, is highlighted with an arrow and a light blue bar.

Tip

  • You can set a breakpoint by double-clicking the blue dot at a source line. Breakpoints appear as red stop signs in the Source window.

  • You can delete a breakpoint by double-clicking the stop sign.

  • You can view the value of an expression directly in a tooltip. When you hover the mouse pointer over a variable, the tooltip displays the type and the value of the variable. To investigate the value of a more complex expression, select the expression and hover the mouse pointer over the selection.

The following keyboard shortcuts are available to move the cursor:

Source Window Keys

Key

Command

Up arrow

Move cursor up

Down arrow

Move cursor down

Left arrow

Move cursor left

Right arrow

Move cursor right

PgUp

One page up

PgDown

One page down

Home

Go to beginning of line

End

Go to end of line

Pop-up Menu

Note

Pop-up menus in the Source window differ according to the following context:

  • Whether the source line you are right-clicking has available debug information, represented by a blue dot next to it.

  • If you right-click an expression.

  • If you right-click or double-click a function.

On Selection "expression"

Contains the following submenu items:

Create Breakpoint

Adds a breakpoint that stops the application when it hits the expression.

Locate In Source

Locates the expression in source code.

Set Value

Opens the Set Value dialog box to set the value of the expression.

This dialog box provides a simple way to modify values of expressions for testing. The modification is only valid during the debug session, so changes are not saved in source files.

The Expression field displays the name of the selected expression. Enter a new value into the Replace field and click Set to set the new value.

Add to Eval Window

Evaluates the expression and adds it to the Evaluation window.

Add to Eval Window From Pointer

Same as Evaluate From Pointer, but the result is displayed in the Evaluations window.

Add to Eval Window From Address

Displays the address in the Evaluations window.

Evaluate

Evaluates the expression. The result is output to the Console window.

Evaluate From Pointer

Evaluates the expression and takes the result as a pointer. The memory contents it points to is output to the Console window.

Evaluate From Address

Displays the address of the selected expression in the Console window.

Create Breakpoint

The debugger evaluates your breakpoint request. If realizable, it sets one or more code breakpoints at the specified line.

If a source line contains more than one source code statement, you can set a breakpoint at each of the statements. For example, if the source line is for (i - 0; i <= 10; i++), then the Set Breakpoint menu item contains an entry for each statement. If a breakpoint is set on a statement, it is marked with a check in the submenu. Selecting such a statement deletes the breakpoint. Selecting a statement without a breakpoint sets a breakpoint.

Delete Breakpoint

The debugger deletes your breakpoint request and all its related breakpoints.

Enable Breakpoint / Disable Breakpoint

Activates an inactive breakpoint at the specified line, or suspends an active one.

Show Current Location

Updates all windows to the current program location.

Go here

Executes the program until the line pointer is reached. The line that has been clicked is not executed.

Set Current Location

The program counter is set to the line marked by the line pointer. Execution continues by processing this line. With this feature, you can jump over sections of code, leaving them unprocessed, or repeat executing sections of code. This feature can produce unpredictable results. Use it with caution.

Jump to Assembler

Jumps to the Assembler code of the specified source line.

Run Until Caller

This menu item is only useful in subroutines. Execution continues until it returns to the calling routine. If the debugger then processes the call, it advances to the next line. Otherwise, it remains on the line with the call.

Copy

Copies the selected expression to the clipboard. Right-click to paste the expression into the Console window or the Evaluate dialog box. This menu item is unavailable if there is no data selected. Copying data to the clipboard replaces the contents previously stored there.

Add Bookmark

Adds a bookmark to the selected line.

Remove Bookmark

Removes the bookmark from the selected line.

Optimization Notice: 
For more complete information about compiler optimizations, see our Optimization Notice.