Using the WDB GUI · Opening Source Files Home and Help IconsKeyword IndexHomeUsing Help
Line Graphic
Line Graphic


Contents

Keyword Index

Using the WDB GUI
Starting and Exiting the WDB GUI
Loading a Program and Changing Program Settings
{short description of image} Opening Source Files
Changing the Working Directory
Saving and Restoring Debug Sessions
Setting Source Paths
Setting Object Paths
Viewing Your Code
Browsing Functions
Setting Signal Handling
Finding Specific Text in Your Code
Using the Command View
Using the Watch View
Using Quick Watch
Using the Local Variables View
Using the Call Stack View
Using the Threads View
Using the Registers View
Examining Memory Use
Using the Program Console
Using Breakpoints
Advancing Through Your Program
Fixing Code from within the Debugger
Starting and Stopping the Debug Process
Setting Debugger Preferences
Customizing Colors and Fonts

Reference Information

Troubleshooting

Using Help



Bullet Overview
Bullet Opening a Source File
Bullet Saving and Closing Source Files
Bullet Tips
Bullet See Also

Line Graphic

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. Line Graphic

Opening a Source File

To open a source file

  1. On the File menu, click Open File.
  2. In the Directories list, double-click to select the appropriate directory.
  3. 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.
  4. 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

  1. On the File menu, click Recent Files. A menu of recently open files will appear.
  2. Click the name of the file you want to open.

{short description of image}

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.

Line Graphic

Tips

  • Click the Open Source File 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).

Line Graphic

See Also

Line Graphic

Return to Top