HPlogo HP WDB-GUI Reference Manual: HP-UX 11i v2 > Chapter 3 Debugging with WDB GUI

Opening Source Files

» 

Technical documentation

Complete book in PDF

 » Table of Contents

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.

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 souce 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.

To save source files

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:

  1. Choose Close File from the edit window pop-up menu (press M3).

  2. 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.

  • You can open a file associated with a particular function using the function browser (see Browsing Functions for details).

© 2004-2005 Hewlett-Packard Development Company, L.P.