The File Menu

The File menu contains commands to load source files and other ASCII text files into the Source window, print from the active window, start an operating-system shell, and end the debugging session. Only the Open Source, Open Module, and Exit commands are available in CVW.

The following table summarizes the commands on the File menu:

Command Purpose

Open Source Opens a source, include, or other text file
Open Module Opens a source file for a module in the program
Print Prints all or part of the active window
DOS Shell Goes to the operating-system prompt temporarily
Exit Exits CodeView

Open Source

The Open Source command displays the Open Source File dialog box. You can select the name of the source file, include file, or other text file to display in the active Source window.

Open Module

The Open Module command displays the Open Module dialog box. This dialog box provides an easy way to load the source file for any module in your program. The dialog box lists the source files that make up the modules in the program you are debugging. Only those modules that include line-number or full symbolic information are listed.

CodeView displays the source file you choose in the active Source window.

Print

In CodeView for MS-DOS only, the Print command displays the Print dialog box, which offers several options to write information in the active window to a device or a file. You can print text in the active window in the following ways:

Window view, which prints text that currently appears in the active window

Complete window contents, which prints the contents of the active window, including what has scrolled out of the window

To print to a file, specify a filename in the dialog box. To append the printed text to the end of the file, select Append. To overwrite a file that already exists, select Overwrite. If you specify a device instead of a file, you can choose either Append or Overwrite.

To print directly to a printer, specify the name of the printer port such as LPT1 or COM2. You must specify a filename or a device name. CodeView reports an error if you omit the name.

DOS Shell

In MS-DOS only, you can use the DOS Shell command to leave CodeView temporarily and go to the operating-system prompt.

When you choose the Shell command, CodeView starts a second copy of the command processor specified by the COMSPEC environment variable. If there is not enough memory to open a new shell, a message appears. Even if you do have enough memory to start a command shell, you may not have enough memory to execute large programs from the shell.

While in the shell, do not start any terminate-and-stay-resident (TSR) programs, such as MSHERC.COM, and do not delete files you are working on during your debugging session. Also, do not delete any files used by CodeView, such as the CURRENT.STS file.

To return to CodeView, type exit at the operating-system prompt to close the shell. For more information about starting a shell, see the “Shell Escape” command on page 468.

Exit

The Exit command saves the current CodeView environment and returns to the program that called CodeView, such as COMMAND.COM, PWB, or another editor. CodeView saves the window arrangement, watch expressions, option settings, and most breakpoints in the state file, CURRENT.STS. It saves current color settings in CLRFILE.CV4 if you are using CV and in CLRFILE.CVW if you are using CVW.

When you start the debugger at a later time, CodeView restores these settings. To prevent CodeView from restoring the information it stores in CURRENT.STS, start the debugger with the /TSF option or use the Statefileread entry in your TOOLS.INI file.