Contents
Keyword Index
Using the WDB GUI
Reference Information
Troubleshooting
Using Help |
|
|
Overview
You can open and view a source file associated with the executable that you are debugging. For example, you might want to set a breakpoint in a particular source file that is associated with the current executable, or you might want to edit and rebuild a file in the debugger.
Opening a Source File
To open a source file
- On the File menu, click Open File.
- In the Directories list, double-click to select the appropriate directory.
- Select the Open in debugger toggle (this is the default). You have the option of opening a file in an external editor. This is useful when you want to edit a file in an external editor, but you also want the debugger to monitor the file for changes, and rebuild the file if changes are detected. See Fixing Code from within the Debugger for details.
- In the Files list, select the appropriate file, then click OK. The file will appear in it's own editable tabbed window in the source area. In the tabbed window, you can set breakpoints just as you would in the Source view. You can also edit the file.
To reopen a source file that was recently open
- On the File menu, click Recent Files. A menu of recently open files will appear.
- Click the name of the file you want to open.
Saving and Closing Source Files
To save a source file
You can save a source file that you've edited in the debugger using any of the following methods:
- Enter Ctrl+S.
- Click on the Save File icon in the toolbar.
- Choose Save File from the edit window pop-up menu (press M3).
- Choose Save File from the File menu.
To close a source file
You can close a source file using one of the following methods:
- Choose Close File from the edit window pop-up menu (press M3).
- Choose Close File from the File menu.
Tips
- Click the
toolbar button to open the Open File dialog box.
- To change the size of the Recent Files list on the File menu, click Preferences on the Edit menu, and then change the value of Recent files list, maximum size.
- You can open another tab for a file in the Source view by choosing Edit File from the Source view pop-up menu (press M3).
- You can open a file in the Source view in an external editor by choosing Open File in $EDITOR from the Source view pop-up menu (press M3). If the
EDITOR environment variable is undefined, vi is used.
- If you are interested in opening a file associated with a particular function, use the function browser (see Browsing Functions for details).
See Also

Return to Top
|