The Options menu contains commands to change the default behavior of CodeView commands and the display status of CodeView windows. You can also set display options with various Command-window commands. When the cursor is in one of the Source, Memory, or Local windows, you can press CTRL+O to display the window's Options dialog box.
For menu items that are toggles, a bullet appears to the left of the item when the option is turned on. No bullet appears when it is turned off.
The following table summarizes the commands on the Options menu:
Command | Purpose |
Source1 Window | Sets Source window 1 display options |
Source2 Window | Sets Source window 2 display options |
Memory1 Window | Sets Memory window 1 display options |
Memory2 Window | Sets Memory window 2 display options |
Local Options | Sets Local window display options |
Trace Speed | Sets animation speed |
Language | Sets the expression evaluator |
Horizontal Scrollbars | Toggles horizontal scroll bars on windows |
Vertical Scrollbars | Toggles vertical scroll bars on windows |
Status Bar | Toggles the status bar display |
Colors | Changes colors of CodeView screen elements |
Screen Swap | Toggles screen exchange |
Case Sensitivity | Toggles case sensitivity of symbols |
32-Bit Registers | Toggles display of 32-bit registers |
Native | Toggles display of p-code or machine code instructions |
The Source Window command displays the Source Window Options dialog box. In this dialog box, you can set the source display mode and other options for the current Source window. These options are as follows:
Option | Description |
Follow CS:IP thread of control | Keeps the current program location visible in the active Source window. |
Source | Displays the source code for the program. |
Mixed Source and Assembly | Displays each source line followed by the disassembly of the code generated for that line. |
Assembly | Displays a disassembly of the machine code in your program. |
Tab Length | Sets the number of spaces to which tab characters expand in the source file. |
Show Machine Code | Shows the address and hexadecimal representation of the machine code in Mixed and Assembly modes. |
Show Symbolic Name | Shows the symbol name in assembly-language displays instead of the numeric value of the symbol. |
The Memory Window command displays the Memory Window Options dialog box, where you can set the starting address and display format of the active Memory window. For details, see “The Memory Windows” on page 356 and the “View Memory” command on page 455.
You can specify the scope of variables to be displayed in the Local window. When you select Local Options from the Options menu, a dialog box appears in which you can select any combination of lexical, function, module, executable, and global scopes. You can also toggle the display of addresses in the Local window from the Local Options dialog box. When you turn Show Addresses on, the BP-relative address of each local variable is shown in the Local window. Otherwise, the Local window shows only the names of the variables.
You can also use the Options (OL) command in the Command window to specify the scope of variables to be displayed in the Local window. For information about the Options command, see page 445.
The Trace Speed command displays the Trace Speed dialog box, which presents a list of three speeds from which you can select.
When you use the Animate command to run your program in slow motion, CodeView pauses execution between each step. The duration of the pause is set with the Trace Speed command. Slow pauses for 1/2 second. Medium pauses for 1/4 second. Fast runs the program as fast as possible while still updating CodeView windows and evaluating breakpoints and watch expressions.
The Language command displays the Language dialog box, which presents a list of the expression evaluators that CodeView has loaded, plus the Auto option.
In your TOOLS.INI file, you can configure CodeView to load a number of different expression evaluators. You can also load expression evaluators by choosing Load from the Run menu. Only one expression evaluator can be active at a time.
The Auto setting is the default. It tells CodeView to set the expression evaluator automatically based on the extension of the source file you are debugging in the current Source window. For more information on expression evaluators, see “Configuring CodeView with TOOLS.INI”.
For more information on using expression evaluators, see Chapter 11, “Using Expressions in CodeView.”
The Horizontal Scrollbars command toggles the horizontal scroll bars on and off. When scroll bars are off, you can drag the bottom window frame, as well as the size box, to resize the window.
The Vertical Scrollbars command toggles the vertical scroll bars on and off. When scroll bars are off, you can drag the right window frame, as well as the size box, to resize the window.
The Status Bar command toggles the status bar on and off. When the status bar is off, you gain an extra line of space for windows.
The Colors command displays a dialog box that lets you change the colors of CodeView screen elements. The Item list box displays all the elements of the debugging screen. The Foreground and Background list boxes show the current color settings for the highlighted element in the Item list box.
To change the color of a screen element, choose an element in the Item list box, then choose foreground and background colors. When you are done, click the OK button. Your new color settings take effect as soon as you exit the dialog box.
If you make a number of changes and want to go back to your previous color settings, click the Reset button. You can then start changing colors again. To close the dialog box without making any changes, click the Cancel button. To reset to the standard CodeView colors, click the Use Default button.
When you specify colors using the Colors command in CodeView, the colors are saved in CLRFILE.CVW if you are using CodeView for Windows and in CLRFILE.CV4 if you are using CodeView for DOS. CodeView saves these files in the directory specified by the INIT environment variable or in the current directory if no INIT environment variable is set. These settings become the new default colors.
The Screen Swap command toggles screen exchange on or off. By default, CodeView switches to your program's output screen whenever you execute code in the program. CodeView uses either screen flipping or screen swapping, depending on the command-line options you used to start the debugger. See “Set Screen-Exchange Method” on page 341.
If your program sends no output to the screen, you'll probably want to turn Screen Swap off. This setting continuously displays CodeView's screen while your program executes.
If Screen Swap is off and your program writes to the screen, a portion of the CodeView display may be overwritten. If this happens, type the Refresh (@) command in the Command window.
The Case Sensitivity command toggles case sensitivity on or off. When Case Sensitivity is on, CodeView treats symbol names as case sensitive (that is, a lowercase letter is different from its corresponding uppercase letter). This option affects only commands that deal with symbols in your program; it does not affect the text-searching commands.
The 32-Bit Registers command toggles 386 mode on and off. When 386 mode is on, a bullet appears next to the command on the menu, and CodeView displays the 32-bit registers in the Register window. In this mode, CodeView can also assemble instructions that use 32-bit registers or memory operands.
When you are debugging a program that uses p-code, you use the Native command to toggle between p-code instructions and native machine instructions. With Native mode on, CodeView displays your program's native CPU instructions. With Native mode off, CodeView displays the instructions in p-code.
For more information on debugging p-code, see topic .